Android-ObservableScrollView
Android-ObservableScrollView copied to clipboard
Incorrect onItemClick occured when using FlexibleSpaceWithImageWithViewPagerTab2Activity
I register a OnItemClickListener to ObservableGridView in FlexibleSpaceWithImageWithViewPagerTab2Activity's fragment, but when I scrolling, the item click event occured incorrectly. I'm sure it's a bug of your library but I have no idea how to resolve it.
I also encountered the same problem.
Do 2 things :
-
comment this line from TouchInterceptionFrameLayout event.setLocation(ev.getX(), ev.getY());
on this code:
if (mDownMotionEventPended) { mDownMotionEventPended = false; MotionEvent event = MotionEvent.obtainNoHistory(mPendingDownMotionEvent); //event.setLocation(ev.getX(), ev.getY()); duplicateTouchEventForChildren(ev, event); } -
for the ListView (or whatever you use) , call this instead of what you have:
mListView.setTouchInterceptionViewGroup(parentOfViewPager)
Same problem here and cant fix it