Android - SplashActivity

摘要:Android - SplashActivity


public class SplashActivity extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //全螢幕設定
        requestWindowFeature(Window.FEATURE_NO_TITLE);;
        setContentView(R.layout.activity_splash);   
        
        new Handler().postDelayed(new Runnable(){

            @Override
            public void run() {
                 Intent mainIntent = new Intent(SplashActivity.this,MainActivity.class);
                 startActivity(mainIntent);
                 SplashActivity.this.finish();
            }
            
        }, 3000);
    }
}