Reputation: 23606
I know that it is possible to change the style of any widget in android. However, i have try with the Seekbar. I want to have seek bar like android 4.0 have. My app is running in android 2.2 and i want to show seekbar like Android 4.0.
So, what should to change?
I have try with below code:
<style name="seekbarStyle" parent="android:Widget.SeekBar">
<item name="android:indeterminateOnly">false</item>
<item name="android:progressDrawable">@android:drawable/progress_horizontal</item>
<item name="android:indeterminateDrawable">@android:drawable/progress_horizontal</item>
<item name="android:minHeight">20dip</item>
<item name="android:maxHeight">20dip</item>
<item name="android:thumb">@android:drawable/seek_thumb</item>
<item name="android:thumbOffset">8dip</item>
<item name="android:focusable">true</item>
</style>
Please help me. I want seekbar style to look like android 4.0 in all device.
Upvotes: 0
Views: 3906
Reputation: 17037
As @user527759 mentioned HoloEverywhere
can make your app to use Holo theme even in old Android versions. I want to show another option, because as you are asking in your question, how to make your SeekBar
looks like in Theme.Holo
. There are a few tools which I am using almost everyday in my 'development life' Android-UI-Utils . You can find lots of useful tools for styling ActionBar
, ActionBar Items
, Generic Icons
and etc. And the thing which you need in is http://android-holo-colors.com/
, which will create a theme for your applications with Holo
colors for the UI elements which you will select before creating the theme.
The thing which I like about that is that you don't depend on another library (which is something which I prefer, at least for styling UI elements) and you can play with the colors. For example if your app's default color is red, you can set default color for holo-colors
to be red too, so all your UI elements will have that color by default.
So this is just another option. I've never used HoloEverywhere
, can't say anything about that library. It depends on you which path you will choose : )
Upvotes: 2
Reputation: 3483
You can use HoloEverywhere library which allows to use Holo themes on Android 2.x
https://github.com/prototik/HoloEverywhere
Upvotes: 5