码迷,mamicode.com
首页 > 移动开发 > 详细

android 控制listview 的滑动速度

时间:2015-05-10 18:56:39      阅读:150      评论:0      收藏: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:

@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 的滑动速度

标签:android listview

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!