I would like to apply a fade-in animation to an ImageView to create the effect that the image, which is loaded from a url, fades in when the download is completed.
I kn
set the ImageView
visibility to INVISIBLE
or GONE
set setAnimationListener
on your animation. and when the onAnimationEnd
change the visibility of the ImageView
.
fadeInAnimation.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationEnd(Animation arg0) {
// let make your image visible
}
@Override
public void onAnimationRepeat(Animation animation) {}
@Override
public void onAnimationStart(Animation animation) {}
});