AlertDialog.Builder
class AlertDialog.Builder
Summary
Public constructors |
|---|
|
Creates a builder for an alert dialog that uses the default alert dialog theme. |
|
Creates a builder for an alert dialog that uses an explicit theme resource. |
Public functions |
|
|---|---|
AlertDialog |
create()Creates an |
Context |
Returns a |
AlertDialog.Builder! |
setAdapter(Set a list of items, which are supplied by the given |
AlertDialog.Builder! |
setCancelable(cancelable: Boolean)Sets whether the dialog is cancelable or not. |
AlertDialog.Builder! |
setCursor(Set a list of items, which are supplied by the given |
AlertDialog.Builder! |
setCustomTitle(customTitleView: View?)Set the title using the custom view |
AlertDialog.Builder! |
Set the |
AlertDialog.Builder! |
setIcon(iconId: @DrawableRes Int)Set the resource id of the |
AlertDialog.Builder! |
setIconAttribute(attrId: @AttrRes Int)Set an icon as supplied by a theme attribute. e.g. |
AlertDialog.Builder! |
This function is deprecated. This flag is only used for pre-Material themes. |
AlertDialog.Builder! |
setItems(Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener. |
AlertDialog.Builder! |
setItems(itemsId: @ArrayRes Int, listener: DialogInterface.OnClickListener!)Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener. |
AlertDialog.Builder! |
setMessage(message: CharSequence?)Set the message to display. |
AlertDialog.Builder! |
setMessage(messageId: @StringRes Int)Set the message to display using the given resource id. |
AlertDialog.Builder! |
setMultiChoiceItems(Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener. |
AlertDialog.Builder! |
setMultiChoiceItems(Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener. |
AlertDialog.Builder! |
setMultiChoiceItems(Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener. |
AlertDialog.Builder! |
setNegativeButton(Set a listener to be invoked when the negative button of the dialog is pressed. |
AlertDialog.Builder! |
setNegativeButton(Set a listener to be invoked when the negative button of the dialog is pressed. |
AlertDialog.Builder! |
setNegativeButtonIcon(icon: Drawable!)Set an icon to be displayed for the negative button. |
AlertDialog.Builder! |
setNeutralButton(Set a listener to be invoked when the neutral button of the dialog is pressed. |
AlertDialog.Builder! |
setNeutralButton(Set a listener to be invoked when the neutral button of the dialog is pressed. |
AlertDialog.Builder! |
setNeutralButtonIcon(icon: Drawable!)Set an icon to be displayed for the neutral button. |
AlertDialog.Builder! |
setOnCancelListener(onCancelListener: DialogInterface.OnCancelListener!)Sets the callback that will be called if the dialog is canceled. |
AlertDialog.Builder! |
setOnDismissListener(Sets the callback that will be called when the dialog is dismissed for any reason. |
AlertDialog.Builder! |
Sets a listener to be invoked when an item in the list is selected. |
AlertDialog.Builder! |
setOnKeyListener(onKeyListener: DialogInterface.OnKeyListener!)Sets the callback that will be called if a key is dispatched to the dialog. |
AlertDialog.Builder! |
setPositiveButton(Set a listener to be invoked when the positive button of the dialog is pressed. |
AlertDialog.Builder! |
setPositiveButton(Set a listener to be invoked when the positive button of the dialog is pressed. |
AlertDialog.Builder! |
setPositiveButtonIcon(icon: Drawable!)Set an icon to be displayed for the positive button. |
AlertDialog.Builder! |
setSingleChoiceItems(Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener. |
AlertDialog.Builder! |
setSingleChoiceItems(Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener. |
AlertDialog.Builder! |
setSingleChoiceItems(Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener. |
AlertDialog.Builder! |
setSingleChoiceItems(Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener. |
AlertDialog.Builder! |
setTitle(title: CharSequence?)Set the title displayed in the |
AlertDialog.Builder! |
Set the title using the given resource id. |
AlertDialog.Builder! |
Inflates a custom view resource inside the dialog, below the message and above the buttons. |
AlertDialog.Builder! |
Sets a custom view to be the contents of the alert dialog. |
AlertDialog! |
show()Creates an |
Public constructors
Builder
Builder(context: Context)
Creates a builder for an alert dialog that uses the default alert dialog theme.
The default alert dialog theme is defined by alertDialogTheme within the parent context's theme.
| Parameters | |
|---|---|
context: Context |
the parent context |
Builder
Builder(context: Context, themeResId: @StyleRes Int)
Creates a builder for an alert dialog that uses an explicit theme resource.
The specified theme resource (themeResId) is applied on top of the parent context's theme. It may be specified as a style resource containing a fully-populated theme, such as Theme_AppCompat_Dialog, to replace all attributes in the parent context's theme including primary and accent colors.
To preserve attributes such as primary and accent colors, the themeResId may instead be specified as an overlay theme such as ThemeOverlay_AppCompat_Dialog. This will override only the window attributes necessary to style the alert window as a dialog.
Alternatively, the themeResId may be specified as 0 to use the parent context's resolved value for alertDialogTheme.
Public functions
create
fun create(): AlertDialog
Creates an AlertDialog with the arguments supplied to this builder.
Calling this method does not display the dialog. If no additional processing is needed, show may be called instead to both create and display the dialog.
getContext
fun getContext(): Context
Returns a Context with the appropriate theme for dialogs created by this Builder. Applications should use this Context for obtaining LayoutInflaters for inflating views that will be used in the resulting dialogs, as it will cause views to be inflated with the correct theme.
| Returns | |
|---|---|
Context |
A Context for built Dialogs. |
setAdapter
fun setAdapter(
adapter: ListAdapter!,
listener: DialogInterface.OnClickListener!
): AlertDialog.Builder!
Set a list of items, which are supplied by the given ListAdapter, to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener.
| Parameters | |
|---|---|
adapter: ListAdapter! |
The |
listener: DialogInterface.OnClickListener! |
The listener that will be called when an item is clicked. |
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setCancelable
fun setCancelable(cancelable: Boolean): AlertDialog.Builder!
Sets whether the dialog is cancelable or not. Default is true.
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setCursor
fun setCursor(
cursor: Cursor!,
listener: DialogInterface.OnClickListener!,
labelColumn: String!
): AlertDialog.Builder!
Set a list of items, which are supplied by the given Cursor, to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener.
| Parameters | |
|---|---|
cursor: Cursor! |
The |
listener: DialogInterface.OnClickListener! |
The listener that will be called when an item is clicked. |
labelColumn: String! |
The column name on the cursor containing the string to display in the label. |
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setCustomTitle
fun setCustomTitle(customTitleView: View?): AlertDialog.Builder!
Set the title using the custom view customTitleView.
The methods setTitle and setIcon should be sufficient for most titles, but this is provided if the title needs more customization. Using this will replace the title and icon set via the other methods.
Note: To ensure consistent styling, the custom view should be inflated or constructed using the alert dialog's themed context obtained via getContext.
| Parameters | |
|---|---|
customTitleView: View? |
the custom view to use as the title |
| Returns | |
|---|---|
AlertDialog.Builder! |
this Builder object to allow for chaining of calls to set methods |
setIcon
fun setIcon(icon: Drawable?): AlertDialog.Builder!
Set the Drawable to be used in the title.
Note: To ensure consistent styling, the drawable should be inflated or constructed using the alert dialog's themed context obtained via getContext.
| Returns | |
|---|---|
AlertDialog.Builder! |
this Builder object to allow for chaining of calls to set methods |
setIcon
fun setIcon(iconId: @DrawableRes Int): AlertDialog.Builder!
Set the resource id of the Drawable to be used in the title.
Takes precedence over values set using setIcon.
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setIconAttribute
fun setIconAttribute(attrId: @AttrRes Int): AlertDialog.Builder!
Set an icon as supplied by a theme attribute. e.g. alertDialogIcon.
funsetInverseBackgroundForced(useInverseBackground: Boolean): AlertDialog.Builder!
Sets the Dialog to use the inverse background, regardless of what the contents is.
| Parameters | |
|---|---|
useInverseBackground: Boolean |
Whether to use the inverse background |
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setItems
fun setItems(
items: Array<CharSequence!>!,
listener: DialogInterface.OnClickListener!
): AlertDialog.Builder!
Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener.
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setItems
fun setItems(itemsId: @ArrayRes Int, listener: DialogInterface.OnClickListener!): AlertDialog.Builder!
Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener. This should be an array type i.e. R.array.foo
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setMessage
fun setMessage(message: CharSequence?): AlertDialog.Builder!
Set the message to display.
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setMessage
fun setMessage(messageId: @StringRes Int): AlertDialog.Builder!
Set the message to display using the given resource id.
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setMultiChoiceItems
fun setMultiChoiceItems(
items: Array<CharSequence!>!,
checkedItems: BooleanArray!,
listener: DialogInterface.OnMultiChoiceClickListener!
): AlertDialog.Builder!
Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener. The list will have a check mark displayed to the right of the text for each checked item. Clicking on an item in the list will not dismiss the dialog. Clicking on a button will dismiss the dialog.
| Parameters | |
|---|---|
items: Array<CharSequence!>! |
the text of the items to be displayed in the list. |
checkedItems: BooleanArray! |
specifies which items are checked. It should be null in which case no items are checked. If non null it must be exactly the same length as the array of items. |
listener: DialogInterface.OnMultiChoiceClickListener! |
notified when an item on the list is clicked. The dialog will not be dismissed when an item is clicked. It will only be dismissed if clicked on a button, if no buttons are supplied it's up to the user to dismiss the dialog. |
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setMultiChoiceItems
fun setMultiChoiceItems(
itemsId: @ArrayRes Int,
checkedItems: BooleanArray!,
listener: DialogInterface.OnMultiChoiceClickListener!
): AlertDialog.Builder!
Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener. This should be an array type, e.g. R.array.foo. The list will have a check mark displayed to the right of the text for each checked item. Clicking on an item in the list will not dismiss the dialog. Clicking on a button will dismiss the dialog.
| Parameters | |
|---|---|
itemsId: @ArrayRes Int |
the resource id of an array i.e. R.array.foo |
checkedItems: BooleanArray! |
specifies which items are checked. It should be null in which case no items are checked. If non null it must be exactly the same length as the array of items. |
listener: DialogInterface.OnMultiChoiceClickListener! |
notified when an item on the list is clicked. The dialog will not be dismissed when an item is clicked. It will only be dismissed if clicked on a button, if no buttons are supplied it's up to the user to dismiss the dialog. |
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setMultiChoiceItems
fun setMultiChoiceItems(
cursor: Cursor!,
isCheckedColumn: String!,
labelColumn: String!,
listener: DialogInterface.OnMultiChoiceClickListener!
): AlertDialog.Builder!
Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener. The list will have a check mark displayed to the right of the text for each checked item. Clicking on an item in the list will not dismiss the dialog. Clicking on a button will dismiss the dialog.
| Parameters | |
|---|---|
cursor: Cursor! |
the cursor used to provide the items. |
isCheckedColumn: String! |
specifies the column name on the cursor to use to determine whether a checkbox is checked or not. It must return an integer value where 1 means checked and 0 means unchecked. |
labelColumn: String! |
The column name on the cursor containing the string to display in the label. |
listener: DialogInterface.OnMultiChoiceClickListener! |
notified when an item on the list is clicked. The dialog will not be dismissed when an item is clicked. It will only be dismissed if clicked on a button, if no buttons are supplied it's up to the user to dismiss the dialog. |
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setNegativeButton
fun setNegativeButton(
text: CharSequence!,
listener: DialogInterface.OnClickListener!
): AlertDialog.Builder!
Set a listener to be invoked when the negative button of the dialog is pressed.
| Parameters | |
|---|---|
text: CharSequence! |
The text to display in the negative button |
listener: DialogInterface.OnClickListener! |
The |
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setNegativeButton
fun setNegativeButton(
textId: @StringRes Int,
listener: DialogInterface.OnClickListener!
): AlertDialog.Builder!
Set a listener to be invoked when the negative button of the dialog is pressed.
| Parameters | |
|---|---|
textId: @StringRes Int |
The resource id of the text to display in the negative button |
listener: DialogInterface.OnClickListener! |
The |
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setNegativeButtonIcon
fun setNegativeButtonIcon(icon: Drawable!): AlertDialog.Builder!
Set an icon to be displayed for the negative button.
| Parameters | |
|---|---|
icon: Drawable! |
The icon to be displayed |
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setNeutralButton
fun setNeutralButton(
text: CharSequence!,
listener: DialogInterface.OnClickListener!
): AlertDialog.Builder!
Set a listener to be invoked when the neutral button of the dialog is pressed.
| Parameters | |
|---|---|
text: CharSequence! |
The text to display in the neutral button |
listener: DialogInterface.OnClickListener! |
The |
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setNeutralButton
fun setNeutralButton(
textId: @StringRes Int,
listener: DialogInterface.OnClickListener!
): AlertDialog.Builder!
Set a listener to be invoked when the neutral button of the dialog is pressed.
| Parameters | |
|---|---|
textId: @StringRes Int |
The resource id of the text to display in the neutral button |
listener: DialogInterface.OnClickListener! |
The |
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setNeutralButtonIcon
fun setNeutralButtonIcon(icon: Drawable!): AlertDialog.Builder!
Set an icon to be displayed for the neutral button.
| Parameters | |
|---|---|
icon: Drawable! |
The icon to be displayed |
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setOnCancelListener
fun setOnCancelListener(onCancelListener: DialogInterface.OnCancelListener!): AlertDialog.Builder!
Sets the callback that will be called if the dialog is canceled.
Even in a cancelable dialog, the dialog may be dismissed for reasons other than being canceled or one of the supplied choices being selected. If you are interested in listening for all cases where the dialog is dismissed and not just when it is canceled, see setOnDismissListener.
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
| See also | |
|---|---|
setCancelable |
|
setOnDismissListener |
setOnDismissListener
fun setOnDismissListener(
onDismissListener: DialogInterface.OnDismissListener!
): AlertDialog.Builder!
Sets the callback that will be called when the dialog is dismissed for any reason.
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setOnItemSelectedListener
fun setOnItemSelectedListener(listener: AdapterView.OnItemSelectedListener!): AlertDialog.Builder!
Sets a listener to be invoked when an item in the list is selected.
| Parameters | |
|---|---|
listener: AdapterView.OnItemSelectedListener! |
the listener to be invoked |
| Returns | |
|---|---|
AlertDialog.Builder! |
this Builder object to allow for chaining of calls to set methods |
| See also | |
|---|---|
setOnItemSelectedListener |
setOnKeyListener
fun setOnKeyListener(onKeyListener: DialogInterface.OnKeyListener!): AlertDialog.Builder!
Sets the callback that will be called if a key is dispatched to the dialog.
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setPositiveButton
fun setPositiveButton(
text: CharSequence!,
listener: DialogInterface.OnClickListener!
): AlertDialog.Builder!
Set a listener to be invoked when the positive button of the dialog is pressed.
| Parameters | |
|---|---|
text: CharSequence! |
The text to display in the positive button |
listener: DialogInterface.OnClickListener! |
The |
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setPositiveButton
fun setPositiveButton(
textId: @StringRes Int,
listener: DialogInterface.OnClickListener!
): AlertDialog.Builder!
Set a listener to be invoked when the positive button of the dialog is pressed.
| Parameters | |
|---|---|
textId: @StringRes Int |
The resource id of the text to display in the positive button |
listener: DialogInterface.OnClickListener! |
The |
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setPositiveButtonIcon
fun setPositiveButtonIcon(icon: Drawable!): AlertDialog.Builder!
Set an icon to be displayed for the positive button.
| Parameters | |
|---|---|
icon: Drawable! |
The icon to be displayed |
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setSingleChoiceItems
fun setSingleChoiceItems(
adapter: ListAdapter!,
checkedItem: Int,
listener: DialogInterface.OnClickListener!
): AlertDialog.Builder!
Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener. The list will have a check mark displayed to the right of the text for the checked item. Clicking on an item in the list will not dismiss the dialog. Clicking on a button will dismiss the dialog.
| Parameters | |
|---|---|
adapter: ListAdapter! |
The |
checkedItem: Int |
specifies which item is checked. If -1 no items are checked. |
listener: DialogInterface.OnClickListener! |
notified when an item on the list is clicked. The dialog will not be dismissed when an item is clicked. It will only be dismissed if clicked on a button, if no buttons are supplied it's up to the user to dismiss the dialog. |
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setSingleChoiceItems
fun setSingleChoiceItems(
items: Array<CharSequence!>!,
checkedItem: Int,
listener: DialogInterface.OnClickListener!
): AlertDialog.Builder!
Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener. The list will have a check mark displayed to the right of the text for the checked item. Clicking on an item in the list will not dismiss the dialog. Clicking on a button will dismiss the dialog.
| Parameters | |
|---|---|
items: Array<CharSequence!>! |
the items to be displayed. |
checkedItem: Int |
specifies which item is checked. If -1 no items are checked. |
listener: DialogInterface.OnClickListener! |
notified when an item on the list is clicked. The dialog will not be dismissed when an item is clicked. It will only be dismissed if clicked on a button, if no buttons are supplied it's up to the user to dismiss the dialog. |
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setSingleChoiceItems
fun setSingleChoiceItems(
itemsId: @ArrayRes Int,
checkedItem: Int,
listener: DialogInterface.OnClickListener!
): AlertDialog.Builder!
Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener. This should be an array type i.e. R.array.foo The list will have a check mark displayed to the right of the text for the checked item. Clicking on an item in the list will not dismiss the dialog. Clicking on a button will dismiss the dialog.
| Parameters | |
|---|---|
itemsId: @ArrayRes Int |
the resource id of an array i.e. R.array.foo |
checkedItem: Int |
specifies which item is checked. If -1 no items are checked. |
listener: DialogInterface.OnClickListener! |
notified when an item on the list is clicked. The dialog will not be dismissed when an item is clicked. It will only be dismissed if clicked on a button, if no buttons are supplied it's up to the user to dismiss the dialog. |
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setSingleChoiceItems
fun setSingleChoiceItems(
cursor: Cursor!,
checkedItem: Int,
labelColumn: String!,
listener: DialogInterface.OnClickListener!
): AlertDialog.Builder!
Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener. The list will have a check mark displayed to the right of the text for the checked item. Clicking on an item in the list will not dismiss the dialog. Clicking on a button will dismiss the dialog.
| Parameters | |
|---|---|
cursor: Cursor! |
the cursor to retrieve the items from. |
checkedItem: Int |
specifies which item is checked. If -1 no items are checked. |
labelColumn: String! |
The column name on the cursor containing the string to display in the label. |
listener: DialogInterface.OnClickListener! |
notified when an item on the list is clicked. The dialog will not be dismissed when an item is clicked. It will only be dismissed if clicked on a button, if no buttons are supplied it's up to the user to dismiss the dialog. |
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setTitle
fun setTitle(title: CharSequence?): AlertDialog.Builder!
Set the title displayed in the Dialog.
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setTitle
fun setTitle(titleId: @StringRes Int): AlertDialog.Builder!
Set the title using the given resource id.
| Returns | |
|---|---|
AlertDialog.Builder! |
This Builder object to allow for chaining of calls to set methods |
setView
fun setView(layoutResId: Int): AlertDialog.Builder!
Inflates a custom view resource inside the dialog, below the message and above the buttons. If none of the other parts of the dialog are made visible, the custom view occupies the entire view. Because the view is inflated inside the parent dialog's view, take care not to define conflicting resource IDs.
| Parameters | |
|---|---|
layoutResId: Int |
Resource ID to be inflated. |
| Returns | |
|---|---|
AlertDialog.Builder! |
this Builder object to allow for chaining of calls to set methods |
setView
fun setView(view: View!): AlertDialog.Builder!
Sets a custom view to be the contents of the alert dialog.
When using a pre-Holo theme, if the supplied view is an instance of a ListView then the light background will be used.
Note: To ensure consistent styling, the custom view should be inflated or constructed using the alert dialog's themed context obtained via getContext.
| Parameters | |
|---|---|
view: View! |
the view to use as the contents of the alert dialog |
| Returns | |
|---|---|
AlertDialog.Builder! |
this Builder object to allow for chaining of calls to set methods |
show
fun show(): AlertDialog!
Creates an AlertDialog with the arguments supplied to this builder and immediately displays the dialog.
Calling this method is functionally identical to:
AlertDialog dialog = builder.create(); dialog.show();