Issue
There is code for progress bar drawable and both progress and background has the corner radis code but it seems like progress corner does not work with clip property I use clip property for vertical progress bar:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<corners android:radius="9dip"/>
<solid android:color="@color/bottom_bar_color"/>
<stroke
android:width="1dp"
android:color="@color/bottom_bar_color" />
</shape>
</item>
<item android:id="@android:id/progress">
<clip
android:clipOrientation="vertical"
android:gravity="bottom">
<shape>
<corners android:radius="9dip"/>
<solid android:color="#FFFFFF"/>
<stroke
android:width="1dp"
android:color="#fff" />
</shape>
</clip>
</item>
</layer-list>
Solution
Found this answer while trying
<scale
android:drawable="@drawable/shape_round"
android:scaleHeight="100%"
android:scaleGravity="bottom"/>
It now round the corner for progress
shape_round.xml
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="9dip" />
<solid android:color="@android:color/white" />
</shape>
Answered By - Nicky
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.