java - How can I improve my progress bar match to follow image (color, angle, shape etc.) -
i have created circular progress-bar, , have made follow closely possible design in image below.
but i'm having difficulty having match design in picture below (color, angle, shape etc.):
i don't know how match :
- the color of above?
- or shape?
design i'm wanting follow:

my current design looks below:

my code far below:
activity_main.xml
<progressbar style="?android:attr/progressbarstylehorizontal" android:id="@+id/progressbar" android:layout_width="240dp" android:layout_height="240dp" android:indeterminate="false" android:max="100" android:progress="75" android:progressdrawable="@drawable/style_circular_fill" android:secondaryprogress="10" android:layout_alignparentbottom="false" android:layout_alignparentstart="false" android:focusableintouchmode="false" android:layout_alignparenttop="true" android:layout_margintop="70dp" xmlns:android="http://schemas.android.com/apk/res/android" /> style_circular_fill.xml
<item android:id="@android:id/secondaryprogress"> <rotate android:fromdegrees="270" android:pivotx="50%" android:pivoty="50%" android:todegrees="270" > <shape android:innerradiusratio="2.5" android:shape="ring" android:thicknessratio="20.0" android:uselevel="true" > <gradient android:centercolor="#a9e2f3" android:endcolor="#a9e2f3" android:startcolor="#a9e2f3" android:type="sweep" /> </shape> </rotate> </item> <item android:id="@android:id/progress"> <rotate android:fromdegrees="270" android:pivotx="50%" android:pivoty="50%" android:todegrees="270" > <shape android:innerradiusratio="2.5" android:shape="ring" android:thicknessratio="20.0" android:uselevel="true" > <gradient android:centercolor="#26ce61" android:endcolor="#26ce61" android:startcolor="#26ce61" android:type="sweep" /> </shape> </rotate> </item>
you try circleprogress library. 1 of examples feature looks quite similar of requirement.
i haven't used it, cannot confirm ease of use.
for sake of being balanced, check out this list of progress bar libraries. there may library can achieve desired effect.
Comments
Post a Comment