在应用程序列表视图中,我在listview中有超过1000个数据,而且滚动起来很乏味。我试图改变滚动图文,但不能改变。我调整滚动图文,如下图所示
<ListView
android:id="@+id/listview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/layoutProduct"
android:background="#00000000"
android:cacheColorHint="#00000000"
android:dividerHeight="1dp"
android:fadeScrollbars="true"
android:fadingEdge="none"
android:scrollbarSize="10dp"
android:scrollbarThumbVertical="@drawable/a_apptheme_fastscroll_thumb_holo"
android:focusable="true"
android:focusableInTouchMode="true"
android:listSelector="#00000000"
android:scrollingCache="false" >
</ListView>

用户可以拖动探测仪
发布于 2014-08-25 10:36:13
在您的setFastScrollEnabled(true);上调用ListView方法。http://developer.android.com/reference/android/widget/AbsListView.html#setFastScrollEnabled(boolean)
发布于 2014-08-25 12:36:52
在ListView XML定义中,添加
android:fastScrollEnabled="true"
android:fastScrollAlwaysVisible="true"在res/ fastscroll_thumb.xml文件夹中创建文件,如下所示:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/fastscroll_pressed" />
<item android:drawable="@drawable/fastscroll" />
</selector>在res文件夹中创建一个values文件夹。在res/值中创建themes.xml文件,如下所示:
<resources>
<style name="ApplicationTheme">
<item name="android:fastScrollThumbDrawable">@drawable/fastscroll_thumb</item>
</style>
</resources>https://stackoverflow.com/questions/25483454
复制相似问题