- context
- The context of the shared preferences.
- resId
- The resource ID of the preference XML file.
- readAgain
- Whether to re-read the default values. If false, this method sets the default values only if this method has never been called in the past (or if the PreferenceManager.KeyHasSetDefaultValues in the default value shared preferences file is false). To attempt to set the default values again bypassing this check, set readAgain to true. Note: this will NOT reset preferences back to their default values. For that functionality, use PreferenceManager.GetDefaultSharedPreferences(Android.Content.Context) and clear it followed by a call to this method with this parameter set to true.
Sets the default values from an XML preference file by reading the values defined by each Android.Preferences.Preference item's android:defaultValue attribute. This should be called by the application's main activity.