欢迎访问移动开发之家(rcyd.net),关注移动开发教程。移动开发之家  移动开发问答|  每日更新
页面位置 : > > > 内容正文

Android Splash Screen,androidsplash

来源: 开发者 投稿于  被查看 20956 次 评论:89

Android Splash Screen,androidsplash


<无详细内容>

1.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();
          }
      });
   }
}

用户评论