Sounds like a bug in how ViewPager dispatches events (sorry for stating the
obvious). I'd consider looking at the source and comparing it to ScrollView
(which handles nested touchable areas just fine).

-- K

2012/10/2 Streets Of Boston <flyingdutc...@gmail.com>

> Hi everyone,
>
> I have a ViewPager that contains pages, each page with a bunch of Buttons
> (or clickable TextViews). When I set the buttons to 'setClickable(false)',
> swiping the ViewPager to another page works fine all the time.
>
> However, when the buttons are clickable (OnClick listener is set), the
> ViewPager won't do anything if the user put his or her finger down on the
> button when he or she starts a swipe or scroll. If the user swipes, the
> button 'eats' all the touch-events (MotionEvents).
>
> Is there a convenient way to make these buttons/textviews clickable and
> make the ViewPager swipe even if the user puts his finger on a button
> initially?
> (I'd like to avoid hacks and using GestureDetectors if possible)
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to