Overwrite android

I would like to overwrite the default android Widget.SeekBar style, which looks like this:

<style name="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>

How can i do this? I tried declaring the style again in manifest.xml, but that would not work.

+3
source share
2 answers

You need to implement the style in the xml file that you want to implement. Then in the xml layout of the file where you are using SeekBar, you just need to set the style in the attribute android:style="".

In style.xml:

<SeekBar style="@style/seekbar_style" />
+3
source

I think you need to write your material in your own xml and put it in the layout.

This may help you:

custom search bar

Android: Drawable SeekBar

+1

Source: https://habr.com/ru/post/1787400/


All Articles