开发者

any one line code to remove single value from Shared Preference?

Is there any one line code to remove a value or index from shared preference. something like: SharedPrefere开发者_C百科nce.remove("FILENAME", value)


If you are looking for one line solution you could use something like this

SharedPreference sp;
// initialize it
sp.edit().remove("value_key").commit();

But i don't see any point of using it like this unless you wan't to make your colleagues life harder while reading it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜