public abstract class AbstractListPreference extends AbstractDialogPreference
AbstractDialogPreference.SavedState| Constructor and Description |
|---|
AbstractListPreference(android.content.Context context)
Creates a new preference, which provides a list of selectable items.
|
AbstractListPreference(android.content.Context context,
android.util.AttributeSet attributeSet)
Creates a new preference, which provides a list of selectable items.
|
AbstractListPreference(android.content.Context context,
android.util.AttributeSet attributeSet,
int defaultStyle)
Creates a new preference, which provides a list of selectable items.
|
AbstractListPreference(android.content.Context context,
android.util.AttributeSet attributeSet,
int defaultStyle,
int defaultStyleResource)
Creates a new preference, which provides a list of selectable items.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDialogItemColor()
Returns the color of the items of the preference's dialog.
|
java.lang.CharSequence[] |
getEntries()
Returns the entries of the list, which is shown by the preference.
|
java.lang.CharSequence[] |
getEntryValues()
Returns the values, which correspond to the entries of the list, which is shown by the
preference.
|
protected int |
indexOf(java.lang.CharSequence value)
Return the index of the entry, a specific value corresponds to.
|
protected boolean |
needInputMethod()
The method, which is invoked on subclasses to determine, whether the soft input mode should
be requested when the preference's dialog becomes shown, or not.
|
void |
setDialogItemColor(int color)
Sets the color of the items of the preference's dialog.
|
void |
setEntries(java.lang.CharSequence[] entries)
Sets the entries of the list, which is shown by the preference.
|
void |
setEntries(int resourceId)
Sets the entries of the list, which is shown by the preference.
|
void |
setEntryValues(java.lang.CharSequence[] entryValues)
Sets the values, which correspond to the entries of the list, which is shown by the
preference.
|
void |
setEntryValues(int resourceId)
Sets the values, which correspond to the entries of the list, which is shown by the
preference.
|
getDialog, getDialogBackground, getDialogButtonBarDividerColor, getDialogButtonTextColor, getDialogContentDividerColor, getDialogHeaderBackground, getDialogHeaderIcon, getDialogIcon, getDialogMessage, getDialogMessageColor, getDialogTitle, getDialogTitleColor, getNegativeButtonText, getPositiveButtonText, isDialogButtonBarDividerShown, isDialogContentDividerShown, isDialogHeaderShown, isDialogShown, isValueShownAsSummary, onClick, onClick, onDialogClosed, onDismiss, onPrepareDialog, onRestoreInstanceState, onSaveInstanceState, setDialogBackground, setDialogBackground, setDialogBackgroundColor, setDialogButtonBarDividerColor, setDialogButtonTextColor, setDialogContentDividerColor, setDialogHeaderBackground, setDialogHeaderBackground, setDialogHeaderBackgroundColor, setDialogHeaderIcon, setDialogHeaderIcon, setDialogIcon, setDialogIcon, setDialogMessage, setDialogMessage, setDialogMessageColor, setDialogTitle, setDialogTitle, setDialogTitleColor, setNegativeButtonText, setNegativeButtonText, setPositiveButtonText, setPositiveButtonText, showDialogButtonBarDivider, showDialogContentDivider, showDialogHeader, showValueAsSummarycallChangeListener, compareTo, findPreferenceInHierarchy, getContext, getDependency, getEditor, getExtras, getFragment, getIcon, getIntent, getKey, getLayoutResource, getOnPreferenceChangeListener, getOnPreferenceClickListener, getOrder, getPersistedBoolean, getPersistedFloat, getPersistedInt, getPersistedLong, getPersistedString, getPreferenceManager, getSharedPreferences, getShouldDisableView, getSummary, getTitle, getTitleRes, getView, getWidgetLayoutResource, hasKey, isEnabled, isPersistent, isSelectable, notifyChanged, notifyDependencyChange, notifyHierarchyChanged, onAttachedToActivity, onAttachedToHierarchy, onBindView, onCreateView, onDependencyChanged, onGetDefaultValue, onParentChanged, onPrepareForRemoval, onSetInitialValue, peekExtras, persistBoolean, persistFloat, persistInt, persistLong, persistString, restoreHierarchyState, saveHierarchyState, setDefaultValue, setDependency, setEnabled, setFragment, setIcon, setIcon, setIntent, setKey, setLayoutResource, setOnPreferenceChangeListener, setOnPreferenceClickListener, setOrder, setPersistent, setSelectable, setShouldDisableView, setSummary, setSummary, setTitle, setTitle, setWidgetLayoutResource, shouldCommit, shouldDisableDependents, shouldPersist, toStringpublic AbstractListPreference(android.content.Context context)
context - The context, which should be used by the preference, as an instance of the class
Context. The context may not be nullpublic AbstractListPreference(android.content.Context context,
android.util.AttributeSet attributeSet)
context - The context, which should be used by the preference, as an instance of the class
Context. The context may not be nullattributeSet - The attributes of the XML tag that is inflating the preference, as an instance of the
type AttributeSet or null, if no attributes are availablepublic AbstractListPreference(android.content.Context context,
android.util.AttributeSet attributeSet,
int defaultStyle)
context - The context, which should be used by the preference, as an instance of the class
Context. The context may not be nullattributeSet - The attributes of the XML tag that is inflating the preference, as an instance of the
type AttributeSet or null, if no attributes are availabledefaultStyle - The default style to apply to this preference. If 0, no style will be applied (beyond
what is included in the theme). This may either be an attribute resource, whose value
will be retrieved from the current theme, or an explicit style resourcepublic AbstractListPreference(android.content.Context context,
android.util.AttributeSet attributeSet,
int defaultStyle,
int defaultStyleResource)
context - The context, which should be used by the preference, as an instance of the class
Context. The context may not be nullattributeSet - The attributes of the XML tag that is inflating the preference, as an instance of the
type AttributeSet or null, if no attributes are availabledefaultStyle - The default style to apply to this preference. If 0, no style will be applied (beyond
what is included in the theme). This may either be an attribute resource, whose value
will be retrieved from the current theme, or an explicit style resourcedefaultStyleResource - A resource identifier of a style resource that supplies default values for the
preference, used only if the default style is 0 or can not be found in the theme. Can
be 0 to not look for defaultsprotected final int indexOf(java.lang.CharSequence value)
value - The value of the entry, whose index should be returned, as an instance of the type
CharSequenceInteger value
or -1 if there is no such entrypublic final int getDialogItemColor()
Integer value or -1, if no custom item color is
setpublic final void setDialogItemColor(int color)
color - The color, which should be set, as an Integer value or -1, if no custom item
color should be setpublic final java.lang.CharSequence[] getEntries()
CharSequence
array or null, if no entries have been setpublic final void setEntries(java.lang.CharSequence[] entries)
entries - The entries, which should be set, as an CharSequence array. The entries may
not be nullpublic final void setEntries(int resourceId)
resourceId - The resource id of the entries, which should be set, as an Integer value. The
resource id must correspond to a valid array resourcepublic final java.lang.CharSequence[] getEntryValues()
CharSequence arraypublic final void setEntryValues(java.lang.CharSequence[] entryValues)
entryValues - The values, which should be set, as a CharSequence array. The values may not
be null and the array's length must be equal to the number of list itemspublic final void setEntryValues(int resourceId)
resourceId - The resource id of the values, which should be set, as an Integer value. The
resource id must correspond to a valid array resource. The array's length must be
equal to the number of list itemsprotected final boolean needInputMethod()
AbstractDialogPreferenceneedInputMethod in class AbstractDialogPreference