So I’ve been having animation issues especially when two animations happen at once or right when an activity loads. I understand it’s probably a resource problem and a lot of things are going on in the main thread causing the animations to stutter.
I’ve found a couple interesting suggestions:
1. Threads (ThreadPoolExecutor)
Here: How do I make my animation smoother Android
Here: How does Android's setDrawingCacheEnabled() work?
3. ViewGroup: animationCache = true
However I haven’t been able to find any sort of examples to implement these things. Any ideas?
I’ve reduced the amount of stutter on my animations by following these rules listed in order of importance when reducing stutter:
- Don’t initiate animations in
- Initiate animations on user events such as
onClickand disable touch events until animation is complete.
- Don’t initiate more than 2 animations simultaneously.