程序安装后第一次启动:
启动页-->功能介绍页-->系统主页
以后启动:
参考: http://blog.csdn.net/sunny276978117/article/details/7684801
启动页-->功能介绍页-->系统主页
以后启动:
启动页-->系统主页
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// setContentView(R.layout.main);
SharedPreferences sp = getSharedPreferences("nassoft_count", MODE_WORLD_READABLE);
int count = sp.getInt("count", 0);
if (count == 0) {// 判断应用是否是第一次启动,进入功能介绍页面
Intent intent = new Intent();
intent.setClass(this, GuideActivity.class);
startActivity(intent);
}else{// 直接进入系统首页
Intent intent = new Intent();
intent.setClass(this, NasInfoMed.class);
startActivity(intent);
}
Editor edit = sp.edit();
edit.putInt("count", ++count);// 计算启动次数
edit.commit();
this.finish();
}
}
参考: http://blog.csdn.net/sunny276978117/article/details/7684801