Reputation: 1087
I have an issue with activities loading and then beginning any sort of animation. Usually by the time the activity is loaded up the animation is already half way complete or completely choppy.
And this is for mostly all cases: progress spinner animation, recyclerview list animations and so on so forth.
Is there anyway I can smooth out the animations when an activity is loaded? Maybe delay everything until the UI is ready to handle the animations and list load?
Here is my scenario.
Both animations, the progress bar and slide/fade in are already half way complete by the time it is visible, or become very choppy. Is there any way to make this a bit smoother?
Here is the list as requested:
Thanks.
Edit: Ill add, that on this activity, the fade in animation is non existent, and the slide in is about halfway complete when it loads.
Upvotes: 3
Views: 1960
Reputation: 493
As of API level 21, you can implement the Activity#onEnterAnimationComplete()
callback and use that to start your animations. Unfortunately, it seems like there's no AppCompat equivalent at this point.
When I faced this issue, I decided to implement the onEnterAnimationComplete()
callback on sufficiently high API levels, while on lower levels I simply fall back to starting animations in onCreate()
.
Upvotes: 3