How would you make rounded gradient for ProgressBar
like on screen?
What I have now:
pb_shape.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="12dip" />
<stroke
android:width="1dip"
android:color="@color/primary_white" />
<gradient
android:angle="270"
android:centerColor="@color/primary_black"
android:centerY="0.5"
android:endColor="@color/primary_black"
android:startColor="@color/primary_black"/>
<padding
android:bottom="4dp"
android:left="4dp"
android:right="4dp"
android:top="4dp" />
</shape>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<corners android:radius="12dip" />
<gradient
android:angle="0"
android:endColor="@color/primary_teal"
android:startColor="@color/primary_blue_dark" />
</shape>
</clip>
</item>
<ProgressBar
android:id="@+id/pb_timer"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:progressDrawable="@drawable/pb_shape" />
I already tried to add android:gradientRadius="12dip"
to pb_shape but it takes no effect.