可以利用各种存储来判断是否第一次启动,比如sp,比如xml
解决方案 »
- 取得当前显示的Activity
- android sdk 安装
- android bc05模组蓝牙
- android ndk 多线程
- android获取视频缩略图策略
- 关于surface 显示的请教
- android1.6和android2.2在各方面的区别是什么
- 请问如何实现点击Button实现控件的替换或者页面的局部替换
- 序列化一对象存成文件,版本升级后,该类增加了一个字段,这样原先存成的文件还能反序列吗?
- 求救,android netty的问题 java.io.IOException: Software caused connection abort
- android opengl 问题
- proguard之后打开文件错误
private SharedPreferences sharepreferences;
private SharedPreferences.Editor editor;
....
oncreat()
sharepreferences=this.getSharedPreferences("check", MODE_PRIVATE);
editor=sharepreferences.edit();
boolean fristload=sharepreferences.getBoolean("fristload", true); if (!fristload) {
Intent intent = new Intent();
intent.setClass(this,toActivity.class);
startActivityForResult(intent,0);
}
button.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
editor.putBoolean("fristload", false);
Intent intent = new Intent();
intent.setClass(this,toActivity.class);
startActivityForResult(intent, 0);
}
}
});