Android animations

Hi, I want to create a circular loader that animates from 0 to an int variable and populates based on this number. For example, for a range from 0 to 100, if the progress is 50, half the circle will be filled. How can I first create shapes programmatically and then animate them?

something like this?

enter image description here

+4
source share
1 answer

One way to do this is to draw a circle on the canvas. Then you use the individual dotted effect with a circular kick. Then you activate the values ​​of this stroke effect so that the outline of the circle grows in a circle.

, DashPathEffect , . fooobar.com/questions/748200/..., , .

ObjectAnimator, .

--- EDIT ---

StackOverflow, , .

+3

Source: https://habr.com/ru/post/1533619/


All Articles