How to make ListView scroll slower when using smoothScrollToPosition () function?

Scrolling through my ListView very fast when using the smoothScrollToPosition(int position) function. I want to tweak this and make it slower.

I tried to set android:fastscrollenabled="false" and setFriction(ViewConfiguration.getScrollFriction() * 5) , but did not solve this problem. Can anybody help me? Any help would be appreciated! Thanks in advanced :)

+6
source share
1 answer

You can try

 smoothScrollToPositionFromTop(position, offset, delay); 

where offset is the distance from the top and delay is the total time it takes to complete the scroll.

You can also set the delay based on the scroll value, for example, a larger delay for a greater distance.

0
source

Source: https://habr.com/ru/post/988149/


All Articles