private Preference . OnPreferenceChangeListener createShowValueAsSummaryListener ( ) { return new Preference . OnPreferenceChangeListener ( ) { @ Override public boolean onPreferenceChange ( final Preference preference , final Object newValue ) { boolean showValueAsSummary = ( Boolean ) newValue ; editTextPreference . showValueAsSummary ( showValueAsSummary ) ; listPreference . showValueAsSummary ( showValueAsSummary ) ; multiChoiceListPreference . showValueAsSummary ( showValueAsSummary ) ; seekBarPreference . showValueAsSummary ( showValueAsSummary ) ; numberPickerPreference . showValueAsSummary ( showValueAsSummary ) ; digitPickerPreference . showValueAsSummary ( showValueAsSummary ) ; resolutionPreference . showValueAsSummary ( showValueAsSummary ) ; colorPalettePreference . showValueAsSummary ( showValueAsSummary ) ; adaptSwitchPreferenceSummary ( showValueAsSummary ) ; return true ; } } ; }
Creates and returns a listener which allows to adapt whether the preference s values should be shown as summaries or not when the corresponding setting has been changed .