I want to know how to give fade in fade out animation to android:background image. i want to use two or more images and give this animation. pls . how can I do that. in any layout..?
cheers
You have to set animation to the layout
You can provide fade_in or fad_out animation to the layout
to set fade_in to layout use the following code
Animation mAnim = AnimationUtils.loadAnimation(this, android.R.anim.fade_in);
layout.startAnimation(mAnim);
to set fade_out to layout use the following code
Animation mAnim = AnimationUtils.loadAnimation(this, android.R.anim.fade_out);
layout.startAnimation(mAnim);
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