最も簡単なSplash ScreenのAndroidでの実現

553 ワード

まずActivityを作成し、SetContentViewでImageViewを介してフルスクリーンの画像を直接作成します.解像度は現在のデバイスと一致することを考慮しなければなりません.onCreate追加コードは以下の通りです.
new Handler().postDelayed(new Runnable(){   
//           Handler         
            public void run() {   
                Intent i = new Intent(SplashScreen.this, Main.class);    
                //  Intent          Main  Activity
                SplashScreen.this.startActivity(i);    //  Main  
                SplashScreen.this.finish();    //         
            }   
        }, 5000);   //5 ,