SharedPreferences sharedPreferences=getSharedPreferences("day",MODE_WORLD_READABLE);
//获取对象
boolean day=sharedPreferences.getBoolean("day",true);
if(day){ //第一次进入 存值代表进入过 第二次跳转页面
SharedPreferences.Editor editor=sharedPreferences.edit();
editor.putBoolean("day",false);
editor.commit();
}else{
startActivity(new Intent(MainActivity.this,Main2Activity.class));
finish();
}