Rounded Edge in Circular progress Bar Android -


i want creat circular progressbar rounded edge. have tried circleprogress library hosted here

https://github.com/lzyzsd/circleprogress

but donutprogress don't have rounded edge want. custom progreesdrawable not able achieve it.

i want design progress bar shown below

enter image description here

one corner rounded marked in picture.

my custom_progress_bar.xml

<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >     <item android:id="@android:id/progress">         <rotate             android:fromdegrees="90"             android:todegrees="90"             android:pivotx="50%"             android:pivoty="50%" >             <shape                 android:innerradiusratio="2.5"                 android:shape="ring"                 android:thicknessratio="15.0" >                  <corners                     android:radius="5dp"                     android:toprightradius="5dp"                     android:topleftradius="5dp"                     />                  <gradient                     android:centercolor="#8aff00"                     android:endcolor="#006554"                     android:startcolor="#006554"                     android:type="sweep" />               </shape>           </rotate>     </item>  </layer-list> 

my layout file

<rootlayout...>  <progressbar         style="?android:attr/progressbarstylehorizontal"         android:layout_width="152dp"         android:layout_height="152dp"         android:layout_centerinparent="true"         android:progress="100"          android:indeterminate="false"         android:progressdrawable="@drawable/back_progress" />     <progressbar     android:id="@+id/progresswheel"     style="?android:attr/progressbarstylehorizontal"     android:layout_width="152dp"     android:layout_height="152dp"     android:layout_centerinparent="true"     android:progress="90"      android:indeterminate="false"     android:progressdrawable="@drawable/circular_progress_bar" />      </rootlayout...> 

also had use 2 progressbar overlapping each other achieve background thing(grey). tried defining background shape inside custom_progress_bar.xml not working, had this. know not solution not able make happen other way.

can me design progress bar in better way rounded edge too.

i'm little late party, code added in fork of castorflex's smoothprogressbar can create progress bar describing! library had rounded edge progress bar , friend , (shout out ryan) able gradient working nicely. https://github.com/mochi-logic/smoothprogressbar


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -