Skip to content

Instantly share code, notes, and snippets.

@kyze8439690 kyze8439690/styles.xml
Last active Dec 27, 2015

Embed
What would you like to do?
In order to make a holo style scrollbar in android 2.3,first you have to import the holo scrollbar resource(sdk/platforms/android-18/data/res/drawable-xhdpi/scrollbar_handle_holo_light.9.png) into your drawable dir, and then to change your style xml
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:scrollbarSize">10.0dip</item><!--very important, in order to show scrollbar properly in android 2.3 and before-->
<item name="android:scrollbarThumbVertical">@drawable/scrollbar</item>
<item name="android:scrollbarThumbHorizontal">@drawable/scrollbar</item>
<item name="android:scrollbarTrackVertical">@null</item>
<item name="android:scrollbarTrackHorizontal">@null</item>
</style>
</resources>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.