uknownothingsnow / CircleProgress

CircleProgress, DonutProgress, ArcProgress
3.81k stars 921 forks source link

How to add an animation for progress #48

Closed Andecy closed 8 years ago

Andecy commented 8 years ago

such as,current progress is 55%,when user open app,see the progress will start with 0% to 55% with a smoothy animation

XxGoliathusxX commented 8 years ago

Example:

DonutProgress donut = (DonutProgress) customView.findViewById(R.id.progress);
ObjectAnimator animation = ObjectAnimator.ofInt(donut, "progress", 0, 55); animation.setDuration(55 * 25);//25 for a fast but not to fast animation animation.setInterpolator(new DecelerateInterpolator()); animation.start();

Andecy commented 8 years ago

soga ObjectAnimator! thank you!

satheeshwaran commented 7 years ago

@XxGoliathusxX You are simply great!! you could add this as a pull request.