开发者

Android application configuration

开发者 https://www.devze.com 2022-12-08 02:16 出处:网络
Where should I store my Android application\'s configuration settings? Coming from the .NET 开发者_JAVA技巧world I was expecting something like a .config file. Do I create a file under res/values, a

Where should I store my Android application's configuration settings?

Coming from the .NET 开发者_JAVA技巧world I was expecting something like a .config file. Do I create a file under res/values, and use that?


There is no res/assets. There are assets/ and res/raw/ for arbitrary files, and res/xml/ for arbitrary XML files. However, all of those are packaged as part of the APK and are not modifiable at runtime.

Take a look at SharedPreferences and the PreferenceScreen system for collecting them from users, if these are user-selected configuration settings.

0

精彩评论

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