Android FastScrollBar的ThumbDrawable未更改。
已编辑 我的Android FastScrollBar的ThumbDrawable未更改。,android,android-listview,android-scrollbar,fastscroll,Android,Android Listview,Android Scrollbar,Fastscroll,已编辑 我的列表视图是: <ListView android:id="@android:id/list" android:layout_width="match_parent" android:layout_height="wrap_content" android:divider="#0d2e3a" android:dividerHeight="1dp" android:fastScrollEnabled="true" styl
列表视图是:
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="#0d2e3a"
android:dividerHeight="1dp"
android:fastScrollEnabled="true"
style="@style/myScrollBar" />
<style name="myScrollBar" >
<item name="android:fastScrollThumbDrawable">@drawable/fastscroll_thumb</item>
</style>
<?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/fast_track_drawable" />
<item android:drawable="@drawable/fast_drawable" />
</selector>
然后,我的fastcroll_thumb.xml
是:
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="#0d2e3a"
android:dividerHeight="1dp"
android:fastScrollEnabled="true"
style="@style/myScrollBar" />
<style name="myScrollBar" >
<item name="android:fastScrollThumbDrawable">@drawable/fastscroll_thumb</item>
</style>
<?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/fast_track_drawable" />
<item android:drawable="@drawable/fast_drawable" />
</selector>
其中,fast\u track\u drawable
和fast\u drawable
是两个图像
但是,我的fastscrollbar
仍未定制。谁能指出我错在哪里。我也看过一些教程,比如,首先,删除ListView xml
中明确提到的style
。在提到其他样式的value
中添加了样式。然后设计了选择器
<style name="Theme.Customactionbartheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
<item name="android:actionBarStyle">@style/MyActionBarStyle</item>
<item name="android:actionBarTabStyle">@style/MyActionBarTabStyle</item>
<item name="android:popupMenuStyle">@style/PopupMenu.Customactionbartheme</item>
<item name="android:actionDropDownStyle">@style/DropDownNav.Customactionbartheme</item>
<item name="android:homeAsUpIndicator">@drawable/ic_navigation_drawer</item>
<item name="android:fastScrollThumbDrawable">@drawable/fastscroll_thumb</item>
</style>