开发者

Managing multiple SharedPreference files

I'm looking for a good way to manage multiple SharedPreference files. Basic开发者_如何学Cally the user should be able to create, edit, and delete the preference files and then select the one they want from a spinner.

What I'm trying to figure out is how do I find all of the preference files that the app has? Is there a way to scan the directory and return the names of all of the preference files?

I'm thinking that once I get a lits of all of the names I could create a string array with all of the names and feed it to the spinner.

Thanks for the help!


I'd use a single SharedPreferences object + an array of preference keys that would get prefixed for different configurations + a simple helper class.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜