Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
初回起動時だけ○○する普通版
SharedPreferences defaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
if(defaultSharedPreferences.getBoolean(PREF_KEY,true)){
defaultSharedPreferences.edit().putBoolean(PREF_KEY,false).apply();
//初めての時の処理
}else{
//二回目以降の処理
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment