Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CircleProgress start angle #51

Closed
guyzk opened this issue Apr 25, 2016 · 7 comments
Closed

CircleProgress start angle #51

guyzk opened this issue Apr 25, 2016 · 7 comments

Comments

@guyzk
Copy link

guyzk commented Apr 25, 2016

Is it possible to modify the CircleProgress to start from the top instead of from a 90 degree angle

@DhavalsShah
Copy link

DhavalsShah commented May 13, 2016

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.

@nish-d
Copy link

nish-d commented Jun 28, 2016

That rotates the text inside too. Is there some other solution?

@nish-d
Copy link

nish-d commented Jun 28, 2016

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.

@DhavalsShah
Copy link

DhavalsShah commented Jul 2, 2016

@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.

@nish-d
Copy link

nish-d commented Jul 2, 2016

This is certainly an innovative solution. Also I just found out there is a method, setStartingDegree(), that does the same.

@hossain-khan
Copy link

hossain-khan commented Jul 8, 2016

@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

@uknownothingsnow
Copy link
Owner

@amardeshbd please use jitpack.io, I havent update mvn center for a long time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants