OK I just got it.
I was still writing a default value into my SharedPreferences
at start from when I was using the ListPreference
. This obviously does not work with the Set the MultiSelectListPreference
wants to create.
I just changed getString
to getStringSet
when trying to fetch the preference and created a StringSet for the default value:
Set<String> consumptionUnits = new HashSet<String>();
consumptionUnits.add("l/km");
consumption_unit = sharedPref.getStringSet("pref_consumptionUnit", consumptionUnits);