返回顶部

收藏

Android Splash Screen

更多

Splash.java

public class Splash extends Activity {
   @Override
   public void onCreate(Bundle icicle) {
      super.onCreate(icicle);
      LayoutInflater inflater = getLayoutInflater();
      View layout = inflater.inflate(R.layout.splashscreen,
                                     (ViewGroup) findViewById(R.id.splash));
      Toast toast = new Toast(getApplicationContext());
      toast.setGravity(Gravity.CENTER_VERTICAL, , );
      toast.setDuration(Toast.LENGTH_LONG);
      toast.setView(layout);
      toast.show();

      new Handler().post(new Runnable() {
          @Override
          public void run() {
             Splash.this.startActivity(new Intent(Splash.this, FrozenBubble.class););
             Splash.this.finish();
          }
      });
   }
}

标签:Splash,启动界面,Toast,Activity,Android,SDK

收藏

0人收藏

支持

0

反对

0

发表评论