<p><span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">给ListView设置快速滑块</span></p>
在布局给ListView设置快速滑块文件中加上
android:fastScrollEnabled="true"
或者在代码中设置
listView.setFastScrollEnabled(true);
自定义ListView的快速滑块,在Manifest文件中,为你ListView所在Activity设置主题
主题中添加如下item,item值就是你滚动条Drawable
<style name="Theme.Sliding.Scrollbar" parent="Theme.Sliding">
<item name="android:fastScrollThumbDrawable">@drawable/catalog_fast_scroll_bar</item>
</style>
好了,我们来运行一下看看效果
下图,4.0的系统&#x