title: Fade out AlphaAnimation bug on Android > 5.0
body: <p>The following code is used to fade out a <code>View</code>. It works for Android SDK &lt; 21.</p>
  
  <pre><code>AlphaAnimation animOut = new AlphaAnimation(1, 0); //fromAlpha, toAlpha
  animOut.setDuration(500);
  animOut.setAnimationListener(new Animation.AnimationListener()
  {
      public void onAnimationStart(Animation animation){}
      public void onAnimationRepeat(Animation animation){}
      public void onAnimationEnd(Animation animation)
      {
          view.setVisibility(View.INVISIBLE);
      }
  });
  view.startAnimation(animOut);
  </code></pre>
  
  <p>Strangely, it doesn't work as expected for Android 5.0 and above. As soon as animation starts, the animated <code>View</code> becomes invisible immediately.
  How can I fix this?</p>
  
  <p>Edit: this bug occurs if <code>AlphaAnimation</code> is started <code>onAnimationEnd()</code>  of a <code>TranslateAnimation</code>.</p>