You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.
Demo project - MainActivity: @debuglog
public void onGetButtonClick(View v) {
final String value = getSharedPref().getString(MainActivity.KEY, null);
toast(MainActivity.KEY + "'s, value= " + value);
} @debuglog
public void onSetButtonClick(View v) {
getSharedPref().edit().clear().commit();// Add this line
getSharedPref().edit().putString(MainActivity.KEY, MainActivity.VALUE)
.commit();
toast(MainActivity.KEY + " with enc value:" + MainActivity.VALUE
+ ". Saved");
}
Then Kill app and relaunch, Click 'GET FOO' value =null. value should be 'Bar'.
The text was updated successfully, but these errors were encountered:
Demo project - MainActivity:
@debuglog
public void onGetButtonClick(View v) {
final String value = getSharedPref().getString(MainActivity.KEY, null);
toast(MainActivity.KEY + "'s, value= " + value);
}
@debuglog
public void onSetButtonClick(View v) {
getSharedPref().edit().clear().commit();// Add this line
getSharedPref().edit().putString(MainActivity.KEY, MainActivity.VALUE)
.commit();
toast(MainActivity.KEY + " with enc value:" + MainActivity.VALUE
+ ". Saved");
}
Then Kill app and relaunch, Click 'GET FOO' value =null. value should be 'Bar'.
The text was updated successfully, but these errors were encountered: