How to make Listview's Scroll slower?

不打扰是莪最后的温柔 提交于 2019-12-31 19:17:11

问题


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 :)


回答1:


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);



回答2:


check

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

mListView.setFriction(0.005f);


来源:https://stackoverflow.com/questions/23625876/how-to-make-listviews-scroll-slower

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!