I am trying to customize the view of the SeekBar as follows:
<SeekBar
android:id="@id/seek_bar_player"
android:layout_width="match_parent"
android:layout_height="6pt"
android:paddingLeft="0pt"
android:paddingRight="0pt"
android:paddingStart="0pt"
android:paddingEnd="0pt"
android:layout_marginBottom="-2pt"
android:layout_above="@id/player_container"
android:progressDrawable="@drawable/seekbar_progress"
android:thumb="@drawable/seekbar_thumb"
android:padding="0pt"
/>
The content of seekbar_progress.xml is,
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@android:id/background"
android:bottom="2pt"
android:top="2pt">
<color android:color="@color/seekbarBackground" />
</item>
<item
android:id="@android:id/progress"
android:bottom="2pt"
android:top="2pt">
<clip>
<color android:color="@color/seekbarProgressBackground" />
</clip>
</item>
</layer-list>
and the content of the seekbar_thumb.xml is,
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:width="2pt"
android:height="6pt">
<color android:color="@android:color/holo_red_dark" />
</item>
</layer-list>
This results in the desired outcome on API 25 virtual device as:
However, its outcome on a Levovo Vibe C with Android 5.1.1 (API Level 22) is weird:
What may be the reason of this? Any suggestion is highly appreciated.