清除所有的数据
sp = getSharedPreferences("config", Context.CONTEXT_RESTRICTED);
Editor editor = sp.edit();editor.clear();
editor.commit();
===============================
清除一条数据
sp.edit().remove(key).commit();
清除所有的数据
sp = getSharedPreferences("config", Context.CONTEXT_RESTRICTED);
Editor editor = sp.edit();editor.commit();
===============================
清除一条数据
sp.edit().remove(key).commit();
转载于:https://my.oschina.net/u/861587/blog/101980