Saturday, 7 September 2013

handle a single touch inside ViewPager

handle a single touch inside ViewPager

i have a ViewPager layout for implement swiping tabs. Everiting works
fine, but i would handle, in every Fragment that compose my ViewPager, a
single touch event. i've try to do this inside my main activity:
@Override
public boolean onTouchEvent(MotionEvent event) {
int action=event.getAction();
if((action == MotionEvent.ACTION_DOWN) && (action ==
MotionEvent.ACTION_UP)) {
getActionBar().show();
return true;
}
return false;
}
but it seems not work. How can i do that?

No comments:

Post a Comment