VerticalViewPager
VerticalViewPager copied to clipboard
Weird Scroll Glitch with Clickable views
When testing on device (Samsung S6, API 21), there is a weird behavior .. if you are on any fragment after the first one, clicking on anything that has 'clickable' attribute to it, would cause the view to slightly scroll above or down to a small amount and then it goes back in right place .. if you click again, it may not show but if you scroll up/down a bit and retry it, it shows that weird behavior again .. I guess the issue is in calculating yOffset in PageScrolled ((int)scrollY) inside PerformDrag() .. Also, I tried everything related to 'focousable', 'focousableInTouchMode', 'DecendantFocousability' but that never worked .. again this is only on device and reproducible using the default sample provided..
Please help .. I invested so much time converting this to Xamarin only to find the issue on device :(
I have also experienced that behavior. I used setOnTouchListener
on the ViewPager
instance as a workaround.
I had an issue with clickable children where the scroll wouldn't work if you held your finger still on the clickable child for a split-sec or longer. I changed the canScroll to return false since I won't be needing that feature, but I guess one of the children (relative view > framelayout (clickable) > image) was returning true. Didn't have time to investigate further.