Android Animation Alpha
Try this
AlphaAnimation animation1 = new AlphaAnimation(0.2f, 1.0f);
animation1.setDuration(1000);
animation1.setStartOffset(5000);
animation1.setFillAfter(true);
iv.startAnimation(animation1);
Might be a little late, but found a lovely solution in the android docs.
//In transition: (alpha from 0 to 0.5)
view.setAlpha(0f);
view.setVisibility(View.VISIBLE);
view.animate()
.alpha(0.5f)
.setDuration(400)
.setListener(null);
//Out transition: (alpha from 0.5 to 0)
view.setAlpha(0.5f)
view.animate()
.alpha(0f)
.setDuration(400)
.setListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
view.setVisibility(View.GONE);
}
});