Code Monkey home page Code Monkey logo

Comments (7)

DhavalsShah avatar DhavalsShah commented on June 26, 2024 1

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.

from circleprogress.

DhavalsShah avatar DhavalsShah commented on June 26, 2024 1

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

from circleprogress.

nish-d avatar nish-d commented on June 26, 2024 1

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

from circleprogress.

nish-d avatar nish-d commented on June 26, 2024

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

from circleprogress.

nish-d avatar nish-d commented on June 26, 2024

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.

from circleprogress.

hossain-khan avatar hossain-khan commented on June 26, 2024

@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

from circleprogress.

uknownothingsnow avatar uknownothingsnow commented on June 26, 2024

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

from circleprogress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.