DialogType - The type of the dialog, which is created by the builderBuilderType - The type of the builderpublic abstract class AbstractButtonBarDialogBuilder<DialogType extends ButtonBarDialog,BuilderType extends AbstractButtonBarDialogBuilder<DialogType,?>> extends AbstractValidateableDialogBuilder<DialogType,BuilderType>
| Constructor and Description |
|---|
AbstractButtonBarDialogBuilder(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 up to three buttons.
|
AbstractButtonBarDialogBuilder(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 up to three buttons.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
obtainStyledAttributes(int themeResourceId)
Obtains all relevant attributes from the current theme.
|
BuilderType |
setButtonBarDividerColor(int color)
Sets the color of the divider, which is located above the buttons of the dialog, which is
created by the builder.
|
BuilderType |
setButtonTextColor(int color)
Sets the color of the button texts of the dialog, which is created by the builder.
|
BuilderType |
setNegativeButton(java.lang.CharSequence text,
android.content.DialogInterface.OnClickListener listener)
Sets the text of the negative button of the dialog, which is created by the builder.
|
BuilderType |
setNegativeButton(int resourceId,
android.content.DialogInterface.OnClickListener listener)
Sets the text of the negative button of the dialog, which is created by the builder.
|
BuilderType |
setNeutralButton(java.lang.CharSequence text,
android.content.DialogInterface.OnClickListener listener)
Sets the text of the neutral button of the dialog, which is created by the builder.
|
BuilderType |
setNeutralButton(int resourceId,
android.content.DialogInterface.OnClickListener listener)
Sets the text of the neutral button of the dialog, which is created by the builder.
|
BuilderType |
setPositiveButton(java.lang.CharSequence text,
android.content.DialogInterface.OnClickListener listener)
Sets the text of the positive button of the dialog, which is created by the builder.
|
BuilderType |
setPositiveButton(int resourceId,
android.content.DialogInterface.OnClickListener listener)
Sets the text of the positive button of the dialog, which is created by the builder.
|
BuilderType |
showButtonBarDivider(boolean show)
Sets, whether the divider, which is located above the buttons of the dialog, which is created
by the builder, should be shown, or not.
|
BuilderType |
stackButtons(boolean stackButtons)
Sets, whether the buttons of the dialog, which is created by the builder, should be aligned
vertically, or not.
|
addAllValidators, 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 AbstractButtonBarDialogBuilder(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 AbstractButtonBarDialogBuilder(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 setButtonTextColor(int color)
color - The color, which should be set, as an Integer value or -1, if no custom
button color should be setpublic final BuilderType stackButtons(boolean stackButtons)
stackButtons - True, if the buttons of the dialog, which is created by the builder, should be
aligned vertically, false otherwisepublic final BuilderType setNegativeButton(java.lang.CharSequence text, 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.text - The text, which should be set, as an instance of the type CharSequence or
null, if no negative button should be shownlistener - The listener, which should be notified, when the negative button is clicked, as an
instance of the type DialogInterface.OnClickListener or null, if no listener
should be notifiedpublic final BuilderType setNegativeButton(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 text, which should be set, as an Integer value. The
resource id must correspond to a valid string resourcelistener - The listener, which should be notified, when the negative button is clicked, as an
instance of the type DialogInterface.OnClickListener or null, if no listener
should be notifiedpublic final BuilderType setPositiveButton(java.lang.CharSequence text, 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.text - The text, which should be set, as an instance of the type CharSequence or
null, if no positive button should be shownlistener - The listener, which should be notified, when the positive button is clicked, as an
instance of the type DialogInterface.OnClickListener or null, if no listener
should be notifiedpublic final BuilderType setPositiveButton(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 text, which should be set, as an Integer value. The
resource id must correspond to a valid string resourcelistener - The listener, which should be notified, when the positive button is clicked, as an
instance of the type DialogInterface.OnClickListener or null, if no listener
should be notifiedpublic final BuilderType setNeutralButton(java.lang.CharSequence text, 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.text - The text, which should be set, as an instance of the type CharSequence or
null, if no neutral button should be shownlistener - The listener, which should be notified, when the neutral button is clicked, as an
instance of the type DialogInterface.OnClickListener or null, if no listener
should be notifiedpublic final BuilderType setNeutralButton(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 text, which should be set, as an Integer value. The
resource id must correspond to a valid string resourcelistener - The listener, which should be notified, when the neutral button is clicked, as an
instance of the type DialogInterface.OnClickListener or null, if no listener
should be notifiedpublic final BuilderType showButtonBarDivider(boolean show)
show - True, if the divider, which is located above the dialog's buttons, should be show,
false otherwisepublic final BuilderType setButtonBarDividerColor(int color)
color - The color, which should be set, as an Integer valueprotected void obtainStyledAttributes(int themeResourceId)
AbstractMaterialDialogBuilderobtainStyledAttributes in class AbstractHeaderDialogBuilder<DialogType extends ButtonBarDialog,BuilderType extends AbstractButtonBarDialogBuilder<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