org.solovyev.android.prefs
Class MultiSelectListPreference<T>

java.lang.Object
  extended by android.preference.Preference
      extended by android.preference.DialogPreference
          extended by android.preference.ListPreference
              extended by org.solovyev.android.prefs.MultiSelectListPreference<T>
All Implemented Interfaces:
android.content.DialogInterface.OnClickListener, android.content.DialogInterface.OnDismissListener, android.preference.PreferenceManager.OnActivityDestroyListener, Comparable<android.preference.Preference>

public class MultiSelectListPreference<T>
extends android.preference.ListPreference

A Preference that displays a list of entries as a dialog and allows multiple selections

This preference will store a string into the SharedPreferences. This string will be the values selected from the ListPreference.setEntryValues(CharSequence[]) array.


Nested Class Summary
static class MultiSelectListPreference.Mapper
           
 
Nested classes/interfaces inherited from class android.preference.Preference
android.preference.Preference.BaseSavedState, android.preference.Preference.OnPreferenceChangeListener, android.preference.Preference.OnPreferenceClickListener
 
Field Summary
 
Fields inherited from class android.preference.Preference
DEFAULT_ORDER
 
Constructor Summary
MultiSelectListPreference(android.content.Context context)
           
MultiSelectListPreference(android.content.Context context, android.util.AttributeSet attrs)
           
 
Method Summary
static
<T> org.solovyev.common.text.Mapper<List<T>>
newListMapper(org.solovyev.common.text.Mapper<T> nestedMapper)
           
static
<T> org.solovyev.common.text.Mapper<List<T>>
newListMapper(org.solovyev.common.text.Mapper<T> nestedMapper, String separator)
           
protected  void onDialogClosed(boolean positiveResult)
           
protected  void onPrepareDialogBuilder(android.app.AlertDialog.Builder builder)
           
 void setEntries(CharSequence[] entries)
           
 
Methods inherited from class android.preference.ListPreference
findIndexOfValue, getEntries, getEntry, getEntryValues, getSummary, getValue, onGetDefaultValue, onRestoreInstanceState, onSaveInstanceState, onSetInitialValue, setEntries, setEntryValues, setEntryValues, setSummary, setValue, setValueIndex
 
Methods inherited from class android.preference.DialogPreference
getDialog, getDialogIcon, getDialogLayoutResource, getDialogMessage, getDialogTitle, getNegativeButtonText, getPositiveButtonText, onActivityDestroy, onBindDialogView, onClick, onClick, onCreateDialogView, onDismiss, setDialogIcon, setDialogIcon, setDialogLayoutResource, setDialogMessage, setDialogMessage, setDialogTitle, setDialogTitle, setNegativeButtonText, setNegativeButtonText, setPositiveButtonText, setPositiveButtonText, showDialog
 
Methods inherited from class android.preference.Preference
callChangeListener, compareTo, findPreferenceInHierarchy, getContext, getDependency, getEditor, getExtras, getFragment, getIcon, getIntent, getKey, getLayoutResource, getOnPreferenceChangeListener, getOnPreferenceClickListener, getOrder, getPersistedBoolean, getPersistedFloat, getPersistedInt, getPersistedLong, getPersistedString, getPreferenceManager, getSharedPreferences, getShouldDisableView, getTitle, getTitleRes, getView, getWidgetLayoutResource, hasKey, isEnabled, isPersistent, isSelectable, notifyChanged, notifyDependencyChange, notifyHierarchyChanged, onAttachedToActivity, onAttachedToHierarchy, onBindView, onCreateView, onDependencyChanged, onPrepareForRemoval, peekExtras, persistBoolean, persistFloat, persistInt, persistLong, persistString, restoreHierarchyState, saveHierarchyState, setDefaultValue, setDependency, setEnabled, setFragment, setIcon, setIcon, setIntent, setKey, setLayoutResource, setOnPreferenceChangeListener, setOnPreferenceClickListener, setOrder, setPersistent, setSelectable, setShouldDisableView, setSummary, setTitle, setTitle, setWidgetLayoutResource, shouldCommit, shouldDisableDependents, shouldPersist, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiSelectListPreference

public MultiSelectListPreference(android.content.Context context)

MultiSelectListPreference

public MultiSelectListPreference(android.content.Context context,
                                 @Nullable
                                 android.util.AttributeSet attrs)
Method Detail

setEntries

public void setEntries(@Nonnull
                       CharSequence[] entries)
Overrides:
setEntries in class android.preference.ListPreference

onPrepareDialogBuilder

protected void onPrepareDialogBuilder(@Nonnull
                                      android.app.AlertDialog.Builder builder)
Overrides:
onPrepareDialogBuilder in class android.preference.ListPreference

onDialogClosed

protected void onDialogClosed(boolean positiveResult)
Overrides:
onDialogClosed in class android.preference.ListPreference

newListMapper

@Nonnull
public static <T> org.solovyev.common.text.Mapper<List<T>> newListMapper(@Nonnull
                                                                                 org.solovyev.common.text.Mapper<T> nestedMapper)

newListMapper

@Nonnull
public static <T> org.solovyev.common.text.Mapper<List<T>> newListMapper(@Nonnull
                                                                                 org.solovyev.common.text.Mapper<T> nestedMapper,
                                                                                 @Nonnull
                                                                                 String separator)


Copyright © 2014 se.solovyev. All Rights Reserved.