title: AlphaAnimation: Fade out works, but not fade in
body: <p>I have the following code:</p>
  
  <pre><code>public boolean stopped = false;
  
  public void fadeOut(final ImageView obj, final int time, int delay)
      {
          if(stopped)
          {
              stopped = false;
              anim = new AlphaAnimation(1.00f, 0.00f);
              anim.setDuration(time);
              if(delay &gt; 0)
              {
                  anim.setStartOffset(delay);
              }
              anim.setAnimationListener(new AnimationListener() {
  
                  @Override
                  public void onAnimationStart(Animation animation) {
                      // TODO Auto-generated method stub
                      Log.v("FADER", "Fading out. Duration: " + time + "ms.");
  
                  }
  
                  @Override
                  public void onAnimationRepeat(Animation animation) {
                      // TODO Auto-generated method stub
  
                  }
  
                  @Override
                  public void onAnimationEnd(Animation animation) {
                      // TODO Auto-generated method stub
                      Log.v("FADER", "Fading out finished.");
                      //obj.setAlpha(255);
                      stopped = true;
                  }
              });
              obj.startAnimation(anim);
          }
      }
  </code></pre>
  
  <p>and this code works fine. My object (an ImageView) fades out beautifully. But when I run this:</p>
  
  <pre><code>public void fadeIn(final ImageView obj, final int time, int delay)
      {
          if(stopped)
          {
              stopped = false;
              anim = new AlphaAnimation(0, 1);
              anim.setDuration(time);
              if(delay &gt; 0)
              {
                  anim.setStartOffset(delay);
              }
              anim.setAnimationListener(new AnimationListener() {
  
                  @Override
                  public void onAnimationStart(Animation animation) {
                      // TODO Auto-generated method stub
                      Log.v("FADER", "Fading in. Duration: " + time + "ms.");
  
                  }
  
                  @Override
                  public void onAnimationRepeat(Animation animation) {
                      // TODO Auto-generated method stub
  
                  }
  
                  @Override
                  public void onAnimationEnd(Animation animation) {
                      // TODO Auto-generated method stub
                      Log.v("FADER", "Fading in finished.");
                      //obj.setAlpha(255);
                      stopped = true;
                  }
              });
              obj.startAnimation(anim);
          }
      }
  </code></pre>
  
  <p>It doesn't work - there is no fading in. The <code>ImageView</code> stays completely transparent. </p>
  
  <p>Why is this, any ideas? </p>
  
  <p>And for those who are wondering, yes, I have declared and set the boolean <code>stopped</code>, so it's not the issue, because when I look at LogCat, it's printing the text as it runs the <code>fadeIn()</code> function. </p>