I am customizing a seekbar in Android, trying to get both inner and outer shadow (bottom side) of the filled section only.
i would like a result like this:
At the moment, I created:
- the rounded borders
- the gradient effect
- the custom thumb
- the inner shadow (on top side of progress, very small)
I am not able to create the outer shadow (on the bottom side of progress).
This is my code:
<?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>
<size android:height="16dp"/>
<corners android:radius="20dp"/>
<solid android:color="@color/background_unselected_gray"/>
</shape>
</item>
<item android:id="@android:id/progress">
<scale android:scaleWidth="100%">
<layer-list>
<item>
<shape>
<corners
android:bottomLeftRadius="20dp"
android:topLeftRadius="20dp"/>
<gradient
android:endColor="@color/button_red_gradient_bottom"
android:startColor="@color/button_red_gradient_top"/>
</shape>
</item>
<item>
<shape>
<corners
android:bottomLeftRadius="18dp"
android:topLeftRadius="18dp"/>
<gradient
android:angle="270"
android:centerColor="@color/horizontal_seekbar_inner_shadow_center"
android:centerY="0.1"
android:endColor="@color/transparent"
android:startColor="@color/horizontal_seekbar_inner_shadow_top"/>
</shape>
</item>
</layer-list>
</scale>
</item>
</layer-list>