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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -