I'm a beginner learning android development and I was trying to make an image switch using fade in and out animation using ImageView.animate().alpha(); what I found is that the image changed before the animation finished so no animation was seen.
my code is
ImageView image = (ImageView)findViewById(R.id.imageToChange);
For waiting for the animation end you might use this example from the Android site and
If you want the view to become visible you need to set
alpha(1f). Also, try
setImageResource before animation (switch line 3 with 2).