![](/img/trans.png)
[英]How to make ListView's scroll slower when using smoothScrollToPosition() function?
[英]How to make Listview's Scroll slower?
滾動我的列表視圖非常快。 我想自定義這個並希望讓它變慢。 我試過設置android:fastscrollenabled="false"
但是沒有解決這個問題。 我的設備是三星Galaxy S2。 有人能幫我嗎? 任何幫助將不勝感激! 謝謝高級:)
請使用ListView的setFriction(float)方法。 因為設備之間的默認摩擦值可能不同,所以最好使用ViewConfiguration.getScrollFriction()中的基值。
例:
setFriction(ViewConfiguration.getScrollFriction() * 2);
校驗
http://developer.android.com/reference/android/widget/AbsListView.html#setFriction(float)
mListView.setFriction(0.005f);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.