Code example for ListPreference

Methods: findIndexOfValuegetEntriessetSummary

0
            String hex = ColorPickerPreference.convertToARGB(Integer.valueOf(String 
                    .valueOf(newValue))); 
            mWidgetBgUnread.setSummary(hex); */ 
 
        } else if (preference == mWidgetLayout) {
            int index = mWidgetLayout.findIndexOfValue((String) newValue);
            mWidgetLayout.setSummary(mWidgetLayout.getEntries()[index]);
            return true; 
 
        } 
        return result;
    } 
 
    private void restoreThemeWidgetsDefaultPreferences() { 
        PreferenceManager.getDefaultSharedPreferences(this).edit().clear().apply();
        setPreferenceScreen(null);
        loadThemePrefs(); 
    } 
 
    public boolean onCreateOptionsMenu(Menu menu) {