I'm trying to programmatically uncheck all the CheckBoxPreference
children of a PreferenceScreen
in my app. How can I do that?
Found a simpler way - sufficient for my use case - which is to clear the preferences. This can be done by a static method provided a context is passed to it:
PreferenceManager.getDefaultSharedPreferences(context).edit().clear().commit();