可以利用各种存储来判断是否第一次启动,比如sp,比如xml

解决方案 »

  1.   

    笨点就写个一个文件上,聪明点就用个SharedPreferences
      

  2.   

    正好我的应用里面有这个,就分享给你了:在mainfest中guide页<action android:name="android.intent.action.MAIN" />guide页面:
           private SharedPreferences sharepreferences;
    private SharedPreferences.Editor editor;
           ....
           oncreat()
          sharepreferences=this.getSharedPreferences("check", MODE_PRIVATE);
    editor=sharepreferences.edit();
            
            boolean fristload=sharepreferences.getBoolean("fristload", true);      if (!fristload) {
    Intent intent = new Intent();
    intent.setClass(this,toActivity.class);
    startActivityForResult(intent,0);
    }
         button.setOnClickListener(new OnClickListener() {
    public void onClick(View v) {

    editor.putBoolean("fristload", false);

    Intent intent = new Intent();
            intent.setClass(this,toActivity.class);

    startActivityForResult(intent, 0);

           }
    }
    });
      

  3.   

    这种方法在安装新版本应用是不是会删除fristload值的,所以安装新版本的时候还是不会进入到第一次启动的界面