title: How to make actviity fading transation in android
body: <p>How to make actcity fading in android ?
  I used the following code, but nothing happens </p>
  
  <pre><code>public class MetroActivity extends Activity {
  
      @Override
      public void onCreate(Bundle savedInstanceState){
          super.onCreate(savedInstanceState);
          setContentView(R.layout.metro_splash);
          getWindow().setWindowAnimations(R.anim.intro_anim);
          Runnable r= new Runnable() {
  
              @Override
              public void run() {
                  Intent i = new Intent(getApplicationContext(),MainActivity.class);
                  startActivity(i);
  
              }
          };
          Handler h = new Handler();
          h.postDelayed(r, 3000);
  
  
      }
  }
  </code></pre>
  
  <p>animation xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;alpha xmlns:android="http://schemas.android.com/apk/res/android"
      android:duration="100"
      android:fromAlpha="0.0"
      android:interpolator="@android:anim/accelerate_interpolator"
      android:toAlpha="1.0" /&gt;
  </code></pre>