eu.easypush.pushlibrary.preferences
Class EasyPushMultiSelectListPreference

java.lang.Object
  extended by android.preference.Preference
      extended by android.preference.DialogPreference
          extended by android.preference.ListPreference
              extended by eu.easypush.pushlibrary.preferences.EasyPushMultiSelectListPreference
All Implemented Interfaces:
android.content.DialogInterface.OnClickListener, android.content.DialogInterface.OnDismissListener, android.preference.PreferenceManager.OnActivityDestroyListener, java.lang.Comparable<android.preference.Preference>

public class EasyPushMultiSelectListPreference
extends android.preference.ListPreference


Nested Class Summary
 
Nested classes/interfaces inherited from class android.preference.Preference
android.preference.Preference.BaseSavedState, android.preference.Preference.OnPreferenceChangeListener, android.preference.Preference.OnPreferenceClickListener
 
Field Summary
static java.lang.String DEFAULT_SEPARATOR
           
 
Fields inherited from class android.preference.Preference
DEFAULT_ORDER
 
Constructor Summary
EasyPushMultiSelectListPreference(android.content.Context context)
           
EasyPushMultiSelectListPreference(android.content.Context context, android.util.AttributeSet attributeSet)
           
 
Method Summary
 java.lang.CharSequence[] getCheckedValues()
          Gets the entries values that are selected
protected static java.lang.String join(java.lang.Iterable<?> iterable, java.lang.String separator)
          Joins array of object to single string by separator Credits to kurellajunior on this post http://snippets.dzone.com/posts/show/91
protected  void onDialogClosed(boolean positiveResult)
           
protected  java.lang.Object onGetDefaultValue(android.content.res.TypedArray typedArray, int index)
           
protected  void onPrepareDialogBuilder(android.app.AlertDialog.Builder builder)
           
protected  void onSetInitialValue(boolean restoreValue, java.lang.Object rawDefaultValue)
           
 
Methods inherited from class android.preference.ListPreference
findIndexOfValue, getEntries, getEntry, getEntryValues, getSummary, getValue, onRestoreInstanceState, onSaveInstanceState, setEntries, 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, onParentChanged, 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
 

Field Detail

DEFAULT_SEPARATOR

public static final java.lang.String DEFAULT_SEPARATOR
See Also:
Constant Field Values
Constructor Detail

EasyPushMultiSelectListPreference

public EasyPushMultiSelectListPreference(android.content.Context context,
                                         android.util.AttributeSet attributeSet)

EasyPushMultiSelectListPreference

public EasyPushMultiSelectListPreference(android.content.Context context)
Method Detail

onPrepareDialogBuilder

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

getCheckedValues

public java.lang.CharSequence[] getCheckedValues()
Gets the entries values that are selected

Returns:
the selected entries values

onDialogClosed

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

onGetDefaultValue

protected java.lang.Object onGetDefaultValue(android.content.res.TypedArray typedArray,
                                             int index)
Overrides:
onGetDefaultValue in class android.preference.ListPreference

onSetInitialValue

protected void onSetInitialValue(boolean restoreValue,
                                 java.lang.Object rawDefaultValue)
Overrides:
onSetInitialValue in class android.preference.ListPreference

join

protected static java.lang.String join(java.lang.Iterable<?> iterable,
                                       java.lang.String separator)
Joins array of object to single string by separator Credits to kurellajunior on this post http://snippets.dzone.com/posts/show/91

Parameters:
iterable - any kind of iterable ex.: ["a", "b", "c"]
separator - separetes entries ex.: ","
Returns:
joined string ex.: "a,b,c"