Thank you. I try onTouch() and se if it helps me. /Hans Den onsdagen den 2:e maj 2012 kl. 21:10:50 UTC+2 skrev JTeagle:
> >I want to disable swype to next page in a ViewPager when som itemes are > >uncecked on current page. when all items are checked i want to enable > >swyping. But still it shold be posible to swype to previus. > > Nothing in ViewPager or its adapter particularly looks useful. > > A rather inelegant solution might be to handle onPageSelected(), and then > put the previous page (you'd have to track it manually) back - but I doubt > that would look very good. > > A possible alternative, though little better, might be to handle onTouch() > and at the times when they are not allowed to swipe, do nothing and return > true to 'eat' the event and prevent the system from acting on it - but > that > would stop *any* touch event on the pager (unless you could isolate the > correct action, but that didn't seem to have anything useful either). > > > -- 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