how to reset all stored data store using shared preferences

前端 未结 4 1920
孤独总比滥情好
孤独总比滥情好 2021-01-01 15:29

I have created an activity where i have used shared preferences for storing data..now in another activity i have an reset button..when i click on the reset button the data s

4条回答
  •  情话喂你
    2021-01-01 15:51

    If you want to wipe all the data in a preference file call clear() from the SharedPreferences.Editor instance

    http://developer.android.com/reference/android/content/SharedPreferences.Editor.html#clear()

提交回复
热议问题