Merge Preferences for flavors into existing base PreferenceCategory

67 Views Asked by At

I am using a base preferences.xml in my library project with two PreferenceCategory(s) with keys "pref_category_one" and "pref_category_two", implemented in SettingsFragment by calling setPreferencesFromResource().

My app flavors then extend the SettingsFragment (ex: SettingsFragmentA, SettingsFragmentB) with additional xml files like preferences_flavor_a, called with addPreferencesFromResource().

However, the app prefs are being added into additional categories with the category divider, so now there are 4 categories instead of 2. I want to have the flavor prefs be added to the same base categories one and two. Is this possible?

0

There are 0 best solutions below