Skip to content

Instantly share code, notes, and snippets.

@kyze8439690
Last active December 27, 2015 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyze8439690/7279259 to your computer and use it in GitHub Desktop.
Save kyze8439690/7279259 to your computer and use it in GitHub Desktop.
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