Skip to content

Instantly share code, notes, and snippets.

@krupalshah
Last active August 12, 2018 10:01
Show Gist options
  • Save krupalshah/ed30f8c451d6a38f9929f7351fb7a61f to your computer and use it in GitHub Desktop.
Save krupalshah/ed30f8c451d6a38f9929f7351fb7a61f to your computer and use it in GitHub Desktop.
helper for shared prefs - java version - Refactoring Step 1
public static void setStringPreference(Context context, String key, String value) {
edit(context, (editor) -> editor.putString(key, value));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment