Custom Progressbar in android

26 Views Asked by At

In search of better solution for custom two side Progressbar as shown in images. the image shows progress bar with two colours indicating two different progresses.

Expected result using custom view

here the percentage and colour both are the variable values. with existing implementation the percentage is variable but not the progress colours.

drawable in use.

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Define the background properties like color etc -->
<item android:id="@android:id/background">
    <shape>
        <solid android:color="#4CAF50" />
        <corners android:radius="16dp" />
    </shape>
</item>

<item android:id="@android:id/progress">
    <clip>
        <shape>
            <solid android:color="#FD5829" />
            <corners android:radius="16dp" />
        </shape>
    </clip>
</item>
0

There are 0 best solutions below