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
You can use: TransitionDrawable, simple code as follows:
// Transition drawable with a transparent drwabale and the final bitmap
final TransitionDrawable td =
new TransitionDrawable(new Drawable[] {
new ColorDrawable(Color.TRANSPARENT),
new BitmapDrawable(mResources, bitmap)
});
// Set background to loading bitmap
imageView.setBackgroundDrawable(
new BitmapDrawable(mResources, mLoadingBitmap));
imageView.setImageDrawable(td);
td.startTransition(FADE_IN_TIME);