博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Android 第一次运行程序提示框操作
阅读量:6859 次
发布时间:2019-06-26

本文共 468 字,大约阅读时间需要 1 分钟。

hot3.png

代码:

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();

转载于:https://my.oschina.net/yongqingfan/blog/802896

你可能感兴趣的文章
Silverlight面向客户端,HTML5面向Web
查看>>
微软拟向互联网开发商提供免费IIS 服务器
查看>>
seajs和requirejs对比;node初识
查看>>
Python笔记总结week1
查看>>
c#中使用NetCDF存储二维数据的读写操作简单应用
查看>>
linux网络相关命令使用
查看>>
java基础(二)
查看>>
记录一下:chrome上,把网页保存为文件的插件
查看>>
C#和Javascript间互转的Xxtea加解密
查看>>
BAT批处理中的字符串处理详解(字符串截取)
查看>>
智力题集锦【二】
查看>>
读 《我为什么放弃Go语言》 有感
查看>>
删除MySQL中冗余字段
查看>>
MS DOS 命令大全
查看>>
升级10.10 Yosemite 后,cocoapods 出现错误(解决方案)
查看>>
UEditor编辑器两个版本任意文件上传漏洞分析
查看>>
Redis分布式锁服务(八)
查看>>
MySQL的引入
查看>>
C++单例模式
查看>>
bower安装报错”Cannot be run with sudo”解决办法
查看>>