SplashScreen 欢迎界面

App 启动的欢迎界面


public class SplashScreenActivity extends AppCompatActivity {
    /**
     * Called when the activity is first created.
     */

    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        getWindow().setFormat(PixelFormat.RGB_565);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);//
        setContentView(R.layout.welcome);

        new Handler().postDelayed(new Runnable() {
            public void run() {

                /* Create an Intent that will start the Main WordPress Activity. */
                Intent mainIntent = new Intent(SplashScreenActivity.this, MainActivity.class);
                startActivity(mainIntent);
                finish();
            }
        }, 1200); //2900 for release

    }

}

你可能感兴趣的:(SplashScreen 欢迎界面)