Skip to content

Instantly share code, notes, and snippets.

@takahirom
Created July 19, 2014 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takahirom/2e22fc7a6daed05f64ca to your computer and use it in GitHub Desktop.
Save takahirom/2e22fc7a6daed05f64ca to your computer and use it in GitHub Desktop.
初回起動時だけ○○する普通版
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