I'm not sure if I understood your problem, but I will try to answer this. So to get touch events on fragment I would do this:
-in your fragment onCreateView:
View view = inflater.inflate(R.layout.fragment_test, container, false);
view.setOnTouchListener(new View.OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
if(event.getAction() == MotionEvent.ACTION_MOVE){
//do something
}
return true;
}
});
//here the rest of your code
return view;
and you can check for different MotionEvents in onTouch, for example:
MotionEvent.ACTION_DOWN, MotionEvent.ACTION_UP,...