I use translate and rotate animations to position View
inside FrameLayout
in onCreate
event. I want animations to perform instantly so I set duration for both of them to 0. But when application starts there is a short blink of my View
in top left corner of screen and then it becomes positioned according to animation parameters. How can I avoid this blink?
I spent whole day with that problem. fillAfter and fillBefore has nothing to do with that. Try this before animation start:
view.setVisibility(View.GONE); // view is our View we trying to animate
Then set animation listener for your animation:
animation.setAnimationListener(new AnimationListener(){
public void onAnimationEnd(Animation animation) {
}
public void onAnimationRepeat(Animation animation) {
}
public void onAnimationStart(Animation animation) {
v.setVisibility(View.VISIBLE);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With