在2.0之后有了overridePendingTransition(),其中里面两个参数,一个是前一个activity的退出两一个activity的进入,

@Override 
      public void onCreate(Bundle savedInstanceState) { 
              super.onCreate(savedInstanceState); 
              setContentView(R.layout.SplashScreen); 
 
              new Handler().postDelayed(new Runnable() { 
                      @Override 
                      public void run() { 
                              Intent mainIntent = new Intent(SplashScreen.this,     AndroidNews.class); 
                              SplashScreen.this.startActivity(mainIntent); 
                              SplashScreen.this.finish(); 
 
                              overridePendingTransition(R.anim.mainfadein, 
                                      R.anim.splashfadeout); 
                      } 
              }, 3000); 
      }

 

上面的代码只是闪屏的一部分

getWindow().setWindowAnimations(int); 
这可没有上个好但是也可以