Closed guyzk closed 7 years ago
Hi guyzk, try android:rotation attribute. It works great in DonutProgress. So, I think it should also work with CircleProgress as well. Usage: android:rotation="rotation of the view, in degrees. " You can also use setRotation(float) method if you want to rotate your view programatically. Try that. Hope this info helps.
That rotates the text inside too. Is there some other solution?
One way could be to set the progress as (100 - required progress). And change the finished_color and unfinished_color appropriately. For example, if you want to display 20% progress, set the progress to 80% and swap the colors for finished and unfinished progress.
@nish-d, I agree it rotates the text inside too, But I have solved that one by putting an attribute of custom:circle_text_color="@android:color/transparent",that makes the default text to transparent(i.e that user can not see) and then I put my own textview inside the progressbar using the framelayout. so its override the default rotated text, so user can see only the our textview which is inside the framelayout.
<FrameLayout>
<CircleProgress custom:circle_text_color="@android:color/transparent"></CircleProgress>
<TextView android:text="20%"></TextView>
</FrameLayout>
Hope this helps you.
This is certainly an innovative solution. Also I just found out there is a method, setStartingDegree(), that does the same.
@lzyzsd I see attr: donut_circle_starting_degree
& setStartingDegree(int startingDegree)
in master-branch
But this is not available in 1.1.0
release in maven central repository is there any plan to publish new version with these changes & features?
Related Issues
@amardeshbd please use jitpack.io, I havent update mvn center for a long time
Is it possible to modify the CircleProgress to start from the top instead of from a 90 degree angle