Android custom animation -


i'm creating custom spinner need animate. spinner consists of 10 shapes draw using canvas , paths. each shape should animated separately , each shape drawn @ separate time. every new shape drawn while rest still going through animation cycle, animating 1 shape 10 , reverse 0.

i have working drawing these shapes inside ondraw method. ondraw called every time invalidate() , invalidate() called recursive method postdelay() every 40ms desired animation. kinda works can see cpu use rising drastically , after 10-15 seconds whole thing grinds halt. going wrong.. possibly that's not right way of attempting animation @ all.

i guess questions - think going wrong , why? right approach animating things on canvas?

edit:

cpu usage levels

edit2:

looks drastic cpu usage coming reusing path objects. not sure why, forgoing reuse of objects , recreating them between ondraw methods has drastically increased performance. cpu usage still climbs 5-10% in 10-15 minutes of running spinner animation that's nothing previous 60-80% experiencing inside minute.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -