I\'m rather new to Android App developing so maybe I\'m just making a simple newbie mistake, but here\'s my problem: I have 2 simple Activities, MainActivity and SettingsAct
I spent some time yesterday on this and am now convinced that it is not intended like that, but actually broken - someone confused reference by pointer and by value. ;-)
Seems to be fixed in the more current versions of Android (since 4.1) though: https://code.google.com/p/android/issues/detail?id=22807
The way I solved it now for the previous versions of Android is to override the setValues method in my implementation of MultiSelectListPreference and just copy the values into a new object:
@Override
public void setValues( Set<String> values ) {
//Workaround for https://code.google.com/p/android/issues/detail?id=22807
final Set<String> newValues = new HashSet<String>();
newValues.addAll( values );
super.setValues( newValues );
}