开发者

About SharedPreferences in android

i was just wondering, if i wanted to reset the actual preference file used with SharedPreferences could i just rename the preference file ? , w开发者_如何学编程ouldn't that mean that the file still exist or does overwrite it ?


prefs.edit().clear().commit(); // prefs = SharedPreferences

is the proper way. Deleting the file with no referencing SharedPreferences objects should result the same.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜