
上QQ阅读APP看书,第一时间看更新
Using more than one preference file
Using getSharedPreferences() is no different from using its counterpart, but it allows for more than one preference file. It takes the following form:
getSharedPreferences(String name, int mode)
Here, name is the file. The mode can be either MODE_PRIVATE, MODE_WORLD_READABLE, or MODE_WORLD_WRITABLE and describes the file's access levels.