Skip to content

Instantly share code, notes, and snippets.

@takahirom
Last active August 29, 2015 14:04
Show Gist options
  • Save takahirom/35fbb0005861f166d246 to your computer and use it in GitHub Desktop.
Save takahirom/35fbb0005861f166d246 to your computer and use it in GitHub Desktop.
FirstTimePreferenceというクラスを使って初回だけ○○したいを実現する
new FirstTimePreference("PREF_KEY").action(CareActivity.this, new FirstTimePreference.FirstTimePreferenceListener() {
@Override
public boolean onFirstTime() {
//初めての時の処理
return true;//次回このメソッドを呼ぶかどうか
}
@Override
public void onNotFirstTime() {
//二回目以降の処理
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment