程序安装后第一次启动:
启动页-->功能介绍页-->系统主页
以后启动:
启动页-->系统主页
可以弄一个文件保存一个状态,推荐用SharedPreferences。
1.可以定义一个变量来判断程序是第几次运行,如果是第一次则跳转到引导的Activity,如果不是第一次则执行系统主页。
//使用SharedPreferences来记录程序的使用次数
/** Called when the activity is firstcreated. */
publicvoidonCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
preferences = getSharedPreferences("count",MODE_WORLD_READABLE);
int count =preferences.getInt("count", 0);
intent.setClass(getApplicationContext(),BootActivity.class);
Editor editor = preferences.edit();