Skip to content Skip to sidebar Skip to footer

How To Change Seekbar Color?

I would like to change progress color and thumb color of seek bar. I used drawable to change progress color but the progress thickness is changed. Is there any way to change thumb

Solution 1:

This is very simple if you are using Material Theme in your project

Just check first which style are you using in your manifest for your app It would be something like below:

<application
    android:allowBackup="false"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme">

Now follow @style/AppTheme

You will probably want to set your parent theme :Theme.AppCompat.Light.DarkActionBar

Note: The colorAccent attribute will give the desired color to all your widgets

<!-- Base application theme. --><stylename="AppTheme"parent="Theme.AppCompat.Light.DarkActionBar"><!-- Customize your theme here. --><itemname="colorPrimary">@color/PrimaryColor</item><itemname="colorPrimaryDark">@color/DarkPrimaryColor</item><itemname="colorAccent">@color/DarkPrimaryColor</item><itemname="android:textColorSecondary">@color/PrimaryColor</item><itemname="android:itemBackground">@color/DarkPrimaryColor</item><itemname="android:textColor">@color/TextIconsColor</item></style>

So if you want, you can create this custom theme for your layouts or activities instead for your whole app theme.

This works for me and its as per Developer Guidelines..As simple as that Ref: Google Developers

Post a Comment for "How To Change Seekbar Color?"