I have a viewpager, one of its fragment has a button which if you tap produces two more buttons along the side that you can swipe to touch(much like picking up the phone gesture in android).
(b1)----------(b2)---------(b3)
b2 on touching produces b1 and b3
everything is fine, except that when i try to move my finger horizontally, the touch events of the viewpager come into picture and the page swipe happens.
I have been able to make it happen in an activity without viewpager so there is no one to capture the sideways gestures.
I thought of the following options
i tried
getActivity().findViewById(R.id.viewpager).onTouchEvent(event)
inside the onTouch of the button but i get "Exeption Dispatching Input Event" in logcat once i go outside the bounds of button.
trying to disable the viewpager touch event, but i havent been able to do that ?
Creating a new transparent fragment or activity which can overlay the fragment, but i am unable to dispatch the touchevent to that activity or fragment ?
Please tell me either of them.
disabling the viewpager touch event?
dispatching the touch to another activity or fragment?
If i could create a custom View that has 3 buttons?