如何使Listview的Scroll变慢? [英] How to make Listview's Scroll slower?

查看:69
本文介绍了如何使Listview的Scroll变慢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的列表视图滚动非常快.我想对此进行自定义,并使其变慢.我试过设置android:fastscrollenabled="false",但不能解决此问题. 我的设备是三星Galaxy S2. 有人能帮我吗?任何帮助将不胜感激! 在此先感谢:)

Scroll of my listview is very fast. I want to customize this and want to make it slower. I tried set android:fastscrollenabled="false" but don't solve this problem. My device is Samsung Galaxy S2. Can someone help me? Any help will be greatly appreciated! Thank in advanced :)

推荐答案

请使用 setFriction(float)方法.由于设备之间的默认摩擦值可能会有所不同,因此最好使用 ViewConfiguration中的基本值. getScrollFriction()

Please use setFriction(float) method of ListView. Because default friction value could differ between devices, it's better to use base value from ViewConfiguration.getScrollFriction()

示例:

setFriction(ViewConfiguration.getScrollFriction() * 2);

这篇关于如何使Listview的Scroll变慢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆