首页 > 移动平台 > 详细

android 控制listview 的滑动速度

时间:2015-05-10 18:55:39      阅读:3102      评论:0      收藏:0      [点我收藏+]

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.

android 控制listview 的滑动速度

原文:http://blog.csdn.net/gaoqilai008/article/details/45623481

(0)
(1)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!