I'm creating a custom Seekbar with thumb.
Currently it looks like this: https://i.stack.imgur.com/p2gS7.jpg
The problem: The drawable i'm using for the thumb (an oval shape) clips over the progressbar.
My code look like this:
The Seekbar in the layout:
<SeekBar
android:background="@android:color/holo_red_light"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:thumb="@xml/thumb_image"
android:progressDrawable="@xml/progress"
android:max="100"/>
progress.xml:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<corners android:radius="5dip" />
<gradient
android:startColor="#ff9d9e9d"
android:centerColor="#ff5a5d5a"
android:centerY="0.75"
android:endColor="#ff747674"
android:angle="270"
/>
</shape>
</item>
<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
<corners android:radius="5dip" />
<gradient
android:startColor="#80ffd300"
android:centerColor="#80ffb600"
android:centerY="0.75"
android:endColor="#a0ffcb00"
android:angle="270"
/>
</shape>
</clip>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<corners android:radius="5dip" />
<gradient
android:startColor="#FFD700"
android:centerColor="#FFB90F"
android:centerY="0.75"
android:endColor="#FFA500"
android:angle="270"
/>
</shape>
</clip>
</item>
</layer-list>
thumb_image.xml:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
android:color="@android:color/transparent">
<solid android:color="@android:color/black" />
<size
android:width="30dp"
android:height="30dp" />
</shape>