正好我的应用里面有这个,就分享给你了:在mainfest中guide页
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);
}
}
});