title: How to make text fade in and out in Android?
body: <p>I have a paragraph of text and when a button is clicked I want that text to fade out, change to some other text, then fade back in. I have some code but it doesn't do the fade out animation just the fade in.</p>
  
  <pre><code>    final TextView mSwitcher = (TextView) findViewById(R.id.bookContent);
      mSwitcher.setText("old text");
  
      final Animation in = new AlphaAnimation(0.0f, 1.0f);
      in.setDuration(3000);
  
      final Animation out = new AlphaAnimation(1.0f, 0.0f);
      out.setDuration(3000);
  
      Button moveOn = (Button) findViewById(R.id.moveOn);
      moveOn.setOnClickListener( new OnClickListener() {
          public void onClick(View v) {
  
              mSwitcher.startAnimation(out);
              mSwitcher.setText("new text");
              mSwitcher.startAnimation(in);
  
          }
      });
  </code></pre>