Answers for "remove key from sharedpreferences android"

3

android clear specific sharedpreference value

SharedPreferences preferences = getSharedPreferences("Mypref", 0);
preferences.edit().remove("text").commit();
Posted by: Guest on May-12-2020
0

android java shared preferences remove key

SharedPreferences mySPrefs = PreferenceManager.getDefaultSharedPreferences(this);
SharedPreferences.Editor editor = mySPrefs.edit();
editor.remove(key);
editor.commit();
Posted by: Guest on May-29-2020

Code answers related to "remove key from sharedpreferences android"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language