首页 > 系统 > Android > 正文

Android 第一次运行程序提示框操作

2019-11-09 15:21:39
字体:
来源:转载
供稿:网友

代码:

PReferences = getSharedPreferences("count",MODE_WORLD_READABLE); int count = preferences.getInt("count", 0); //判断程序与第几次运行,如果是第一次运行则跳转到引导页面 if (count == 0) { Intent intent = new Intent(); intent.setClass(getapplicationContext(),LaunchGuideViewActivity.class); startActivity(intent); this.finish(); } Editor editor = preferences.edit(); //存入数据 editor.putInt("count", ++count); //提交修改 editor.commit();
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表