Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Listview's Scroll slower?

Scroll of my listview is very fast. I want to customize this and want to make it slower. I tried set android:fastscrollenabled="false" but don't solve this problem. My device is Samsung Galaxy S2. Can someone help me? Any help will be greatly appreciated! Thank in advanced :)

like image 587
nguoitotkhomaisao Avatar asked May 13 '14 08:05

nguoitotkhomaisao


2 Answers

Please use setFriction(float) method of ListView. Because default friction value could differ between devices, it's better to use base value from ViewConfiguration.getScrollFriction()

Example:

setFriction(ViewConfiguration.getScrollFriction() * 2);
like image 124
vadimvolk Avatar answered Oct 02 '22 22:10

vadimvolk


check

http://developer.android.com/reference/android/widget/AbsListView.html#setFriction(float)

mListView.setFriction(0.005f);
like image 24
Vinayak Bevinakatti Avatar answered Oct 02 '22 23:10

Vinayak Bevinakatti