public abstract class AbstractListPreference extends DialogPreference
DialogPreference.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 |
|---|---|
android.content.res.ColorStateList |
getDialogItemColor()
Returns the color of the items of the preference's dialog.
|
android.graphics.Typeface |
getDialogItemTypeface()
Returns the typeface 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 void |
onPrepareDialog(<any> dialogBuilder)
The method, which is invoked on subclasses when the preference's dialog is about to be
created.
|
void |
setDialogItemColor(android.content.res.ColorStateList colorStateList)
Sets the color of the items of the preference's dialog.
|
void |
setDialogItemColor(int color)
Sets the color of the items of the preference's dialog.
|
void |
setDialogItemTypeface(android.graphics.Typeface typeface)
Sets the typeface 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.
|
areDialogDividersShownOnScroll, createDialog, createDialogBuilder, getDialog, getDialogBackground, getDialogBottomMargin, getDialogButtonTextColor, getDialogButtonTypeface, getDialogCancelAnimation, getDialogDismissAnimation, getDialogDividerColor, getDialogDividerMargin, getDialogGravity, getDialogHeaderBackground, getDialogHeaderIcon, getDialogHeaderIconTintList, getDialogHeaderIconTintMode, getDialogHeight, getDialogIcon, getDialogIconTintList, getDialogIconTintMode, getDialogLeftMargin, getDialogMaxHeight, getDialogMaxWidth, getDialogMessage, getDialogMessageColor, getDialogMessageTypeface, getDialogPaddingBottom, getDialogPaddingLeft, getDialogPaddingRight, getDialogPaddingTop, getDialogRightMargin, getDialogScrollableArea, getDialogShowAnimation, getDialogTitle, getDialogTitleColor, getDialogTitleTypeface, getDialogTopMargin, getDialogWidth, getDialogWindowBackground, getNegativeButtonText, getPositiveButtonText, isDialogButtonBarDividerShown, isDialogFitsSystemWindowsBottom, isDialogFitsSystemWindowsLeft, isDialogFitsSystemWindowsRight, isDialogFitsSystemWindowsTop, isDialogFullscreen, isDialogHeaderShown, isDialogShown, isValueShownAsSummary, needInputMethod, onCancel, onClick, onClick, onDialogClosed, onDismiss, onKey, onRestoreInstanceState, onSaveInstanceState, onShow, performClick, setCustomDialogButtonBar, setCustomDialogButtonBar, setCustomDialogHeader, setCustomDialogHeader, setCustomDialogMessage, setCustomDialogMessage, setCustomDialogTitle, setCustomDialogTitle, setDialogBackground, setDialogBackground, setDialogBackgroundColor, setDialogButtonTextColor, setDialogButtonTextColor, setDialogButtonTypeface, setDialogCancelAnimation, setDialogDismissAnimation, setDialogDividerColor, setDialogDividerMargin, setDialogFitsSystemWindows, setDialogFitsSystemWindows, setDialogFullscreen, setDialogGravity, setDialogHeaderBackground, setDialogHeaderBackground, setDialogHeaderBackgroundColor, setDialogHeaderIcon, setDialogHeaderIcon, setDialogHeaderIconTint, setDialogHeaderIconTintList, setDialogHeaderIconTintMode, setDialogHeight, setDialogIcon, setDialogIcon, setDialogIconTint, setDialogIconTintList, setDialogIconTintMode, setDialogMargin, setDialogMaxHeight, setDialogMaxWidth, setDialogMessage, setDialogMessage, setDialogMessageColor, setDialogMessageTypeface, setDialogPadding, setDialogScrollableArea, setDialogScrollableArea, setDialogShowAnimation, setDialogTitle, setDialogTitle, setDialogTitleColor, setDialogTitleTypeface, setDialogWidth, setDialogWindowBackground, setDialogWindowBackground, setNegativeButtonText, setNegativeButtonText, setOnCancelListener, setOnClickListener, setOnDismissListener, setOnKeyListener, setOnShowListener, setPositiveButtonText, setPositiveButtonText, showDialogButtonBarDivider, showDialogDividersOnScroll, showDialogHeader, showValueAsSummarygetIconTintList, getIconTintMode, setIcon, setIconTint, setIconTintList, setIconTintModepublic 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 android.content.res.ColorStateList getDialogItemColor()
ColorStateList or null, 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 void setDialogItemColor(android.content.res.ColorStateList colorStateList)
colorStateList - The color, which should be set, as an instance of the class ColorStateList.
The color state list may not be nullpublic final android.graphics.Typeface getDialogItemTypeface()
Typeface or null, if the default typeface is usedpublic final void setDialogItemTypeface(android.graphics.Typeface typeface)
typeface - The typeface, which should be set, as an instance of the class Typeface or
null, if the default typeface should be usedpublic 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 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 java.lang.CharSequence[] getEntryValues()
CharSequence arraypublic 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 void onPrepareDialog(<any> dialogBuilder)
DialogPreferenceonPrepareDialog in class DialogPreferencedialogBuilder - The builder, which is used to create the preference's dialog, as an instance of the
class AbstractMaterialDialogBuilder