dimanche 8 mars 2015

How can I access the preferences of a file that is added to my activity with addPreferencesFromResource(id)?



I have two preference files in my res/xml/ folder, named preferences.xml and exampleprefs.xml. The object representing preferences.xml is accessed by getSharedPreferences("com.example.project_preferences", Context.MODE_PRIVATE) or simply getDefaultSharedPreferences().


How can I access exampleprefs.xml if it is added to my activity with addPreferencesFromResource(R.xml.exampleprefs)?




Aucun commentaire:

Enregistrer un commentaire