Answer the question
In order to leave comments, you need to log in
How to add SharedPreferences files to a project in AndroidStudio?
It is necessary that when installing the application, the settings.xml
file goes into the /data/data/package_name/shared_prefs/ directory . to have preset settings.
How to implement this?
Answer the question
In order to leave comments, you need to log in
To set the default settings in onCreate you need to call
this will load the SharedPreferences data from the res/xml/preferences.xml file without overwriting the data set by the user.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question