[android-developers] ViewPager MotionEvent changes between onInterceptTouchEvent and onTouchEvent
Setup:
I am using a custom ViewGroup withing ViewPager(horizontal scroll) . custom viewgroup provides vertical scrolling and has implemented OnGestureListener with the help of GestureDetector.I am using android.support.v4.view (revision 6) with android 4.03
+ViewPager (horizontal scrolling)
+ CustomView (vertical scrolling)
- TextView
- TextView
+ CustomView
- TextView
- TextView
Problem:
Sometime when I am scrolling horizontally ViewPager fails to move to the next Page(my custom viewgroup)
What I found to be the reason is that whenever it fails to move I get a different event in onTouchEvent of ViewPager than the one intercepted in onInterceptTouchEvent of ViewPager. ACTION_MOVE(in onInterceptTouchEvent ) is sent back as ACTION_UP(in onTouchEvent ) and hence no scrolling happens. I am not able to understand how and why ACTION_MOVE is getting changed to ACTION_UP. Could it be something to do with what I do in my custom ViewGroup?
thanks
harvinder
-- 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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home