由网友(少撸怡情丶多撸伤身)分享简介:如何删除共享preferences数据,我的应用程序?How do I delete SharedPreferences data for my application?我要创建一个使用了大量的Web服务来同步数据的应用程序。出于测试目的,我需要我的时候重新启动应用程序,以消灭某些共享preferences值。I...
如何删除共享preferences数据,我的应用程序?
How do I delete SharedPreferences data for my application?
我要创建一个使用了大量的Web服务来同步数据的应用程序。出于测试目的,我需要我的时候重新启动应用程序,以消灭某些共享preferences值。
I'm creating an application that uses a lot of web services to sync data. For testing purposes I need to wipe out some SharedPreferences values when I restart the app.
推荐答案
要删除特定值:Shared$p$pferences.Editor.remove()其次是提交()
To remove specific values: SharedPreferences.Editor.remove() followed by a commit()
要全部删除共享preferences.Editor.clear()
后跟一个提交()
相关推荐
最新文章