Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/193.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android FastScrollBar的ThumbDrawable未更改。_Android_Android Listview_Android Scrollbar_Fastscroll - Fatal编程技术网

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>