Last active
January 28, 2016 19:51
-
-
Save pedrojoya/5734942 to your computer and use it in GitHub Desktop.
Entrada SharedPreferences
This file contains 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
// SharedPreferences preferencias = | |
// getSharedPreferences("pref_apl", Context.MODE_PRIVATE); | |
SharedPreferences.Editor editor = preferencias.edit(); | |
editor.putString("nombre", nombre); | |
editor.putInt("total", total); | |
editor.apply(); |
This file contains 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
// SharedPreferences preferencias = | |
// getSharedPreferences("pref_apl", Context.MODE_PRIVATE); | |
int total = preferencias.getInt("total", 0); |
This file contains 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
SharedPreferences preferencias = | |
getSharedPreferences("pref_apl", Context.MODE_PRIVATE); |
This file contains 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
<?xml version='1.0' encoding='utf-8' standalone='yes' ?> | |
<map> | |
<string name="nombre">Baldomero</string> | |
<int name="total" value="25" /> | |
</map> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment