你的位置:首页 > 操作系统

[操作系统]Android 启动界面


 1 public class LoadingActivity extends Activity { 2  3   @Override 4   protected void onCreate(Bundle savedInstanceState) { 5     super.onCreate(savedInstanceState); 6  7     // 去掉标题栏 8     // 必须在setContentView之前调用 9     this.requestWindowFeature(Window.FEATURE_NO_TITLE);10 11     setContentView(R.layout.activity_loading);12 13     Handler handler = new Handler();14     handler.postDelayed(new loadingRunnable(), 3000);15   }16 17   public class loadingRunnable implements Runnable {18 19     @Override20     public void run() {21       //打开新Activity22       startActivity(new Intent(getApplication(), MainActivity.class));23       //关闭本Activity24       LoadingActivity.this.finish();25     }26   }27 }