当前位置: 代码迷 >> Android >> android 统制listview 的滑动速度
  详细解决方案

android 统制listview 的滑动速度

热度:99   发布时间:2016-04-28 01:04:17.0
android 控制listview 的滑动速度

How to control Android ListView scrolling speed

I found that I can control the scrolling speed of an Android ListView using code like this in a Fragment:

@Overridepublic void onStart() {    super.onStart();    // scroll speed decreases as friction increases. a value of 2 worked    // well in an emulator; i need to test it on a real device    getListView().setFriction(ViewConfiguration.getScrollFriction() * 2);}

I did this because the default ListView scroll speed is too fast by default, and as a result, it’s hard on the eyes when you scroll through a lot of items.

  相关解决方案