Пример #1
0
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   requestWindowFeature(Window.FEATURE_NO_TITLE);
   getWindow()
       .setFlags(
           WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
   setContentView(R.layout.welcome);
   appManger = AppManger.getAppManger();
   appManger.addActivity(Xunlian_Welcome.this);
   new Thread(this).start();
 }
Пример #2
0
  public void run() {
    try {
      Thread.sleep(2000);

      sp = getSharedPreferences("isFirstUse", Context.MODE_PRIVATE);
      if (sp.getBoolean("isFirstUse", true)) {
      } else {
        // startActivity(new Intent(Welcome.this, GuideActivity.class));
        appManger.finishActivity(Xunlian_Welcome.this);
      }
      sp = getSharedPreferences("PatternUnlockpassword", Xunlian_Welcome.this.MODE_PRIVATE);
      editor = sp.edit();
      if (sp.getBoolean("isStrat", false)) {

        startActivity(new Intent(Xunlian_Welcome.this, Xunlian_LockActivity.class));
        appManger.finishActivity(Xunlian_Welcome.this);
      } else {

        sp = getSharedPreferences("autoLogin", Xunlian_Welcome.this.MODE_PRIVATE);
        editor = sp.edit();

        if (sp.getBoolean("isAutoLogin", false)) {

          startActivity(new Intent(Xunlian_Welcome.this, Xunlian_MainActivity.class));
          appManger.finishActivity(Xunlian_Welcome.this);
        } else {
          startActivity(new Intent(Xunlian_Welcome.this, Xunlian_Account.class));
          appManger.finishActivity(Xunlian_Welcome.this);
        }
      }
      finish();

    } catch (Exception e) {

    }
  }