Android: how to get list of all preference xml's for my app and read them?

前端 未结 3 395
挽巷
挽巷 2020-12-16 04:16

how to get list of all application preferences for application,

1. I am saving shared preference in this manner

3条回答
  •  温柔的废话
    2020-12-16 05:09

    If you want to use reflection, there is an @hide function Context#getSharedPrefsFile(String name)

    So you would call

    Context#getSharedPrefsFile(String name).getParentFile() to get a reference to the shared_prefs dir

提交回复
热议问题