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

来源:互联网 发布:思迅天店软件 编辑:程序博客网 时间:2024/05/29 19:12
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();

0 0
原创粉丝点击