Functions
Link copied to clipboard
Creates an AlertDialog with the arguments supplied to this builder.
Link copied to clipboard
Returns a Context with the appropriate theme for dialogs created by this Builder.
Link copied to clipboard
open 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.
Link copied to clipboard
Sets whether the dialog is cancelable or not.
Link copied to clipboard
open 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.
Link copied to clipboard
Set the title using the custom view
customTitleView
.Link copied to clipboard
Set an icon as supplied by a theme attribute.
Link copied to clipboard
Sets the Dialog to use the inverse background, regardless of what the contents is.
Link copied to clipboard
open fun setItems(@ArrayRes itemsId: Int, listener: DialogInterface.OnClickListener): AlertDialog.Builder
open 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.
Link copied to clipboard
Set the message to display using the given resource id.
Set the message to display.
Link copied to clipboard
open fun setMultiChoiceItems(@ArrayRes itemsId: Int, checkedItems: Array<Boolean>, listener: DialogInterface.OnMultiChoiceClickListener): AlertDialog.Builder
open fun setMultiChoiceItems(items: Array<CharSequence>, checkedItems: Array<Boolean>, listener: DialogInterface.OnMultiChoiceClickListener): AlertDialog.Builder
open 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.
Link copied to clipboard
open fun setNegativeButton(@StringRes textId: Int, listener: DialogInterface.OnClickListener): AlertDialog.Builder
open fun setNegativeButton(text: CharSequence, listener: DialogInterface.OnClickListener): AlertDialog.Builder
Set a listener to be invoked when the negative button of the dialog is pressed.
Link copied to clipboard
Set an icon to be displayed for the negative button.
Link copied to clipboard
open fun setNeutralButton(@StringRes textId: Int, listener: DialogInterface.OnClickListener): AlertDialog.Builder
open fun setNeutralButton(text: CharSequence, listener: DialogInterface.OnClickListener): AlertDialog.Builder
Set a listener to be invoked when the neutral button of the dialog is pressed.
Link copied to clipboard
Set an icon to be displayed for the neutral button.
Link copied to clipboard
open fun setOnCancelListener(onCancelListener: DialogInterface.OnCancelListener): AlertDialog.Builder
Sets the callback that will be called if the dialog is canceled.
Link copied to clipboard
open fun setOnDismissListener(onDismissListener: DialogInterface.OnDismissListener): AlertDialog.Builder
Sets the callback that will be called when the dialog is dismissed for any reason.
Link copied to clipboard
open fun setOnItemSelectedListener(listener: AdapterView.OnItemSelectedListener): AlertDialog.Builder
Sets a listener to be invoked when an item in the list is selected.
Link copied to clipboard
Sets the callback that will be called if a key is dispatched to the dialog.
Link copied to clipboard
open fun setPositiveButton(@StringRes textId: Int, listener: DialogInterface.OnClickListener): AlertDialog.Builder
open fun setPositiveButton(text: CharSequence, listener: DialogInterface.OnClickListener): AlertDialog.Builder
Set a listener to be invoked when the positive button of the dialog is pressed.
Link copied to clipboard
Set an icon to be displayed for the positive button.
Link copied to clipboard
Link copied to clipboard
open fun setSingleChoiceItems(adapter: ListAdapter, checkedItem: Int, listener: DialogInterface.OnClickListener): AlertDialog.Builder
open fun setSingleChoiceItems(@ArrayRes itemsId: Int, checkedItem: Int, listener: DialogInterface.OnClickListener): AlertDialog.Builder
open fun setSingleChoiceItems(items: Array<CharSequence>, checkedItem: Int, listener: DialogInterface.OnClickListener): AlertDialog.Builder
open 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.
Link copied to clipboard
Set the title using the given resource id.
Set the title displayed in the Dialog.
Link copied to clipboard
Sets a custom view to be the contents of the alert dialog.
Inflates a custom view resource inside the dialog, below the message and above the buttons.
open fun
Set a custom view to be the contents of the Dialog, specifying the spacing to appear around that view.
Link copied to clipboard
Creates an AlertDialog with the arguments supplied to this builder and immediately displays the dialog.