1

I want to check default value in MultiSelectListPreference from code. I've seen this question but did not find any solution. Please suggest a way to do it.

    if (notificatinType != null) {
        multi_list_preference.setEntries(notificatinType);
    }
    if (notificationTypeValue != null) {
        multi_list_preference.setEntryValues(notificationTypeValue);
    }
    Boolean[] entryChecked = { true, false, true };
    //String tryCheck = "[1, 2]";
    multi_list_preference.setDefaultValue(entryChecked);        
    if (notificationSelected != null) {
        multi_list_preference.setDefaultValue(entryChecked);
    }
Community
  • 1
  • 1
SkyWalker
  • 855
  • 2
  • 14
  • 36

0 Answers0