DialogType - The type of the dialog, which is created by the builderBuilderType - The type of the builderpublic abstract class AbstractListDialogBuilder<DialogType extends ListDialog,BuilderType extends AbstractListDialogBuilder<DialogType,?>> extends AbstractButtonBarDialogBuilder<DialogType,BuilderType>
| Constructor and Description |
|---|
AbstractListDialogBuilder(android.content.Context context)
Creates a new builder, which allows to create dialogs, which allow to create and show
dialogs, which are designed according to Android 5's Material Design guidelines even on
pre-Lollipop devices and may contain list items.
|
AbstractListDialogBuilder(android.content.Context context,
int themeResourceId)
Creates a new builder, which allows to create dialogs, which allow to create and show
dialogs, which are designed according to Android 5's Material Design guidelines even on
pre-Lollipop devices and may contain list items.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
obtainStyledAttributes(int themeResourceId)
Obtains all relevant attributes from the current theme.
|
BuilderType |
setAdapter(android.widget.ListAdapter adapter,
android.content.DialogInterface.OnClickListener listener)
Sets the adapter, which provides the items, which should be shown by the dialog, which is
created by the builder.
|
BuilderType |
setItemColor(int color)
Sets the color of the list items of the dialog, which is created by the builder.
|
BuilderType |
setItems(java.lang.CharSequence[] items,
android.content.DialogInterface.OnClickListener listener)
Sets the items, which should be shown by the dialog, which is created by the builder.
|
BuilderType |
setItems(int resourceId,
android.content.DialogInterface.OnClickListener listener)
Sets the items, which should be shown by the dialog, which is created by the builder.
|
BuilderType |
setMultiChoiceItems(java.lang.CharSequence[] items,
boolean[] checkedItems,
android.content.DialogInterface.OnMultiChoiceClickListener listener)
Sets the selectable items, which should be shown by the dialog, which is created by the
builder.
|
BuilderType |
setMultiChoiceItems(int resourceId,
boolean[] checkedItems,
android.content.DialogInterface.OnMultiChoiceClickListener listener)
Sets the selectable items, which should be shown by the dialog, which is created by the
builder.
|
BuilderType |
setMultiChoiceItems(android.widget.ListAdapter adapter,
boolean[] checkedItems,
android.content.DialogInterface.OnMultiChoiceClickListener listener)
Sets the adapter, which provides the selectable items, which should be shown by the dialog,
which is created by the builder.
|
BuilderType |
setOnItemSelectedListener(android.widget.AdapterView.OnItemSelectedListener listener)
Sets the listener, which should be notified, when an item, which is shown by the dialog,
which is created by the builder, is selected.
|
BuilderType |
setSingleChoiceItems(java.lang.CharSequence[] items,
int checkedItem,
android.content.DialogInterface.OnClickListener listener)
Sets the selectable items, which should be shown by the dialog, which is created by the
builder.
|
BuilderType |
setSingleChoiceItems(int resourceId,
int checkedItem,
android.content.DialogInterface.OnClickListener listener)
Sets the selectable items, which should be shown by the dialog, which is created by the
builder.
|
BuilderType |
setSingleChoiceItems(android.widget.ListAdapter adapter,
int checkedItem,
android.content.DialogInterface.OnClickListener listener)
Sets the adapter, which provides the selectable items, which should be shown by the dialog,
which is created by the builder.
|
setButtonBarDividerColor, setButtonTextColor, setNegativeButton, setNegativeButton, setNeutralButton, setNeutralButton, setPositiveButton, setPositiveButton, showButtonBarDivider, stackButtonsaddAllValidators, addValidatorsetHeaderBackground, setHeaderBackground, setHeaderBackgroundColor, setHeaderDividerColor, setHeaderHeight, setHeaderIcon, setHeaderIcon, showHeader, showHeaderDividercreate, getContext, getDialog, onCreateDialog, self, setBackground, setBackground, setBackgroundColor, setCancelable, setCustomMessage, setCustomMessage, setCustomTitle, setCustomTitle, setIcon, setIcon, setIconAttribute, setMessage, setMessage, setMessageColor, setOnCancelListener, setOnDismissListener, setOnShowListener, setTitle, setTitle, setTitleColor, setView, setViewpublic AbstractListDialogBuilder(android.content.Context context)
context - The context, which should be used by the builder, as an instance of the class Context. The context may not be nullpublic AbstractListDialogBuilder(android.content.Context context,
int themeResourceId)
context - The context, which should be used by the builder, as an instance of the class Context. The context may not be nullthemeResourceId - The resource id of the theme, which should be used by the dialog, as an Integer value. The resource id must correspond to a valid themepublic final BuilderType setItemColor(int color)
color - The color, which should be set, as an Integer value or -1, if no custom color
should be setpublic final BuilderType setItems(java.lang.CharSequence[] items, android.content.DialogInterface.OnClickListener listener)
onSaveInstanceState-method, because it is not serializable. Therefore this
method must be called again after configuration changes, e.g when the orientation of the
device has changed, in order to re-register the listener.items - The items, which should be set, as an array of the type CharSequence. The
items may not be nulllistener - The listener, which should be notified, when an item is clicked, as an instance of
the type DialogInterface.OnClickListener or null, if no listener should be
notifiedpublic final BuilderType setItems(int resourceId, android.content.DialogInterface.OnClickListener listener)
onSaveInstanceState-method, because it is not serializable. Therefore this
method must be called again after configuration changes, e.g when the orientation of the
device has changed, in order to re-register the listener.resourceId - The resource id of the items, which should be set, as an Integer value. The
resource id must correspond to a valid array resourcelistener - The listener, which should be notified, when an item is clicked, as an instance of
the type DialogInterface.OnClickListener or null, if no listener should be
notifiedpublic final BuilderType setAdapter(android.widget.ListAdapter adapter, android.content.DialogInterface.OnClickListener listener)
onSaveInstanceState-method, because they are not serializable. Therefore this
method must be called again after configuration changes, e.g when the orientation of the
device has changed, in order to re-set the adapter and re-register the listener.adapter - The adapter, which should be set, as an instance of the type ListAdapter. The
adapter may not be nulllistener - The listener, which should be notified, when an item is clicked, as an instance of
the type DialogInterface.OnClickListener or null, if no listener should be
notifiedpublic final BuilderType setSingleChoiceItems(java.lang.CharSequence[] items, int checkedItem, android.content.DialogInterface.OnClickListener listener)
onSaveInstanceState-method, because it is not serializable. Therefore this
method must be called again after configuration changes, e.g when the orientation of the
device has changed, in order to re-register the listener.items - The items, which should be set, as an array of the type CharSequence. The
items may not be nullcheckedItem - The index of the item, which should be selected by default, as an Integer
value or -1, if no item should be selected by defaultlistener - The listener, which should be notified, when an item is clicked, as an instance of
the type DialogInterface.OnClickListener or null, if no listener should be
notifiedpublic final BuilderType setSingleChoiceItems(int resourceId, int checkedItem, android.content.DialogInterface.OnClickListener listener)
onSaveInstanceState-method, because it is not serializable. Therefore this
method must be called again after configuration changes, e.g when the orientation of the
device has changed, in order to re-register the listener.resourceId - The resource id of the items, which should be set, as an Integer value. The
resource id must correspond to a valid array resourcecheckedItem - The index of the item, which should be selected by default, as an Integer
value or -1, if no item should be selected by defaultlistener - The listener, which should be notified, when an item is clicked, as an instance of
the type DialogInterface.OnClickListener or null, if no listener should be
notifiedpublic final BuilderType setSingleChoiceItems(android.widget.ListAdapter adapter, int checkedItem, android.content.DialogInterface.OnClickListener listener)
onSaveInstanceState-method, because they are not serializable. Therefore this
method must be called again after configuration changes, e.g when the orientation of the
device has changed, in order to re-set the adapter and re-register the listener.adapter - The adapter, which should be set, as an instance of the type ListAdapter. The
adapter may not be nullcheckedItem - The index of the item, which should be selected by default, as an Integer
value or -1, if no item should be selected by defaultlistener - The listener, which should be notified, when an item is clicked, as an instance of
the type DialogInterface.OnClickListener or null, if no listener should be
notifiedpublic final BuilderType setMultiChoiceItems(java.lang.CharSequence[] items, boolean[] checkedItems, android.content.DialogInterface.OnMultiChoiceClickListener listener)
onSaveInstanceState-method, because it is not serializable. Therefore this
method must be called again after configuration changes, e.g when the orientation of the
device has changed, in order to re-register the listener.items - The items, which should be set, as an array of the type CharSequence. The
items may not be nullcheckedItems - An array, which contains, whether the items, which correspond to the corresponding
indices, should be selected by default, or not, as a Boolean array or null,
if no items should be selected by defaultlistener - The listener, which should be notified, when an item is clicked, as an instance of
the type DialogInterface.OnClickListener or null, if no listener should be
notifiedpublic final BuilderType setMultiChoiceItems(int resourceId, boolean[] checkedItems, android.content.DialogInterface.OnMultiChoiceClickListener listener)
onSaveInstanceState-method, because it is not serializable. Therefore this
method must be called again after configuration changes, e.g when the orientation of the
device has changed, in order to re-register the listener.resourceId - The resource id of the items, which should be set, as an Integer value. The
resource id must correspond to a valid array resourcecheckedItems - An array, which contains, whether the items, which correspond to the corresponding
indices, should be selected by default, or not, as a Boolean array or null,
if no items should be selected by defaultlistener - The listener, which should be notified, when an item is clicked, as an instance of
the type DialogInterface.OnClickListener or null, if no listener should be
notifiedpublic final BuilderType setMultiChoiceItems(android.widget.ListAdapter adapter, boolean[] checkedItems, android.content.DialogInterface.OnMultiChoiceClickListener listener)
onSaveInstanceState-method, because they are not serializable. Therefore this
method must be called again after configuration changes, e.g when the orientation of the
device has changed, in order to re-set the adapter and re-register the listener.adapter - The adapter, which should be set, as an instance of the type ListAdapter. The
adapter may not be nullcheckedItems - An array, which contains, whether the items, which correspond to the corresponding
indices, should be selected by default, or not, as a Boolean array or null,
if no items should be selected by defaultlistener - The listener, which should be notified, when an item is clicked, as an instance of
the type DialogInterface.OnMultiChoiceClickListener or null, if no listener
should be notifiedpublic final BuilderType setOnItemSelectedListener(android.widget.AdapterView.OnItemSelectedListener listener)
listener - The listener, which should be set, as an instance of the type AdapterView.OnItemSelectedListener or null, if no listener should be notifiedprotected void obtainStyledAttributes(int themeResourceId)
AbstractMaterialDialogBuilderobtainStyledAttributes in class AbstractButtonBarDialogBuilder<DialogType extends ListDialog,BuilderType extends AbstractListDialogBuilder<DialogType,?>>themeResourceId - The resource id of the theme, which should be used by the dialog, as an Integer value. The resource id must correspond to a valid style resource