Does anyone know how to modify sensitivity of ViewPager?
Currently I use a ViewPager from android v4 support library to implement my own photo viewer.
However, default ViewPager is too sensitive, when my finger touch down on screen and moves by a very short distinct(maybe just 0.5cm). Then ViewPager will be toggled to scroll to next/previous photo view.
Is there any way to overwrite default behavior of ViewPager to decrease sensitivity?
Thanks to any response.
I’ve checked out ViewPager.java from src of compatibility library and seems there’s not way to do it by xml or some setter. ViewPager has code like the following:
As You can see, it uses it’s internal constants for determination of fling distance and etc.
Good news are: You can copy ViewPager (here licence of it should be considered) to Your code and extend it e.g. to get fling distance from xml attribute.