Create a theme in res/styles.xml
:
<style name="CustomTheme" parent="android:Theme">
<item name="android:scrollbarTrackVertical">@drawable/scroll_track</item>
<item name="android:scrollbarThumbVertical">@drawable/scroll_thumb</item>
</style>
@drawable/scroll_track
and @drawable/scroll_thumb
must refer either to nine patch images or to a shape drawables. Scroll track image is a background for the scroll bar. Scroll thumb is responsible for the scroll handle. Then just apply the theme either to whole application or to an activity within AndroidManifest.xml:
<application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@style/CustomTheme">
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…