Infine, ho trovato una soluzione. Funziona solo con livello di API 11 o superiori valori
/style.xml
<style name="AppTheme" parent="@style/Theme.Sherlock.Light">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
<item name="android:fastScrollThumbDrawable">@drawable/fast_thumb</item>
<item name="android:fastScrollTrackDrawable">@drawable/fastscroll_track_default_holo_dark</item>
</style>
Applicare l'attività di questo tema come sottostante Codice:
<activity
android:name="com.example.viewpager.FirstActivity"
android:theme="@style/AppTheme"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
attività di layout XML come qui di seguito codice:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rlScrollingPlayList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical" >
<ListView
android:id="@+id/listView1"
android:layout_width="match_parent"
android:fastScrollEnabled="true"
android:fastScrollAlwaysVisible="true"
android:scrollbarStyle="outsideInset"
android:layout_height="match_parent" >
</ListView>
</RelativeLayout>
Resource file di immagine sono
veloce scorrimento del file di selezione pollice XML:
drawable/fast_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_thumb_pressed_holo"/>
<item android:drawable="@drawable/fastscroll_thumb_default_holo"></item>
</selector>
uscita finale come di seguito figura:
fonte
2013-06-27 11:14:14
u possono postare il tuo codice? – KOTIOS