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:

@Override
public 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.

文章来自:http://blog.csdn.net/gaoqilai008/article/details/45623481
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3