CodePudding user response:
Storage will be set when a file name, SharedPreferences app2=getSharedPreferences (" app2 ", 0);Change the file name to the user id try, or directly to the user id_key named can achieve a goal
CodePudding user response:
It is the key - value of storage you corresponding to different users of different keyCodePudding user response:
SP is a key/value pairs stored key - value, you put each set for the user key in different corresponding preference for value, taking when directly according to the key can get different user preferencesCodePudding user response:
Each user has a key, the value is the user preferences into a json data, if the data save large amount of advice to its own cacheCodePudding user response:
Users are stored in different files, sp essence is stored in XML files, load sp files need to set the file name, file name can be generated according to the user id has rules, for example: config1,