Created
October 27, 2014 09:07
-
-
Save housemeow/a09ac0fa2361ebdd5a82 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Context _context; | |
public void setBooleanValue(boolean booleanValue) { | |
SharedPreferences settings = _context.getSharedPreferences( | |
PREFERENCE_NAME, 0); | |
SharedPreferences.Editor editor = settings.edit(); | |
editor.putBoolean(PROPERTY_NAME, booleanValue); | |
editor.commit(); | |
} | |
public boolean getBooleanValue() { | |
SharedPreferences settings = _context.getSharedPreferences( | |
PREFERENCE_NAME, 0); | |
return settings.getBoolean(PROPERTY_NAME, false); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment