Added in API level 1

DialogInterface


interface DialogInterface
android.content.DialogInterface

Interface that defines a dialog-type class that can be shown, dismissed, or canceled, and may have buttons that can be clicked.

Summary

Nested classes
abstract

Interface used to allow the creator of a dialog to run some code when the dialog is canceled.

abstract

Interface used to allow the creator of a dialog to run some code when an item on the dialog is clicked.

abstract

Interface used to allow the creator of a dialog to run some code when the dialog is dismissed.

abstract

Interface definition for a callback to be invoked when a key event is dispatched to this dialog.

abstract

Interface used to allow the creator of a dialog to run some code when an item in a multi-choice dialog is clicked.

abstract

Interface used to allow the creator of a dialog to run some code when the dialog is shown.

Constants
static Int

static Int

static Int

static Int

The identifier for the negative button.

static Int

The identifier for the neutral button.

static Int

The identifier for the positive button.

Public methods
abstract Unit

Cancels the dialog, invoking the OnCancelListener.

abstract Unit

Dismisses the dialog, invoking the OnDismissListener.

Constants

BUTTON1

Added in API level 1
Deprecated in API level 15
static val BUTTON1: Int

Deprecated: Use BUTTON_POSITIVE

Value: -1

BUTTON2

Added in API level 1
Deprecated in API level 15
static val BUTTON2: Int

Deprecated: Use BUTTON_NEGATIVE

Value: -2

BUTTON3

Added in API level 1
Deprecated in API level 15
static val BUTTON3: Int

Deprecated: Use BUTTON_NEUTRAL

Value: -3

BUTTON_NEGATIVE

Added in API level 3
static val BUTTON_NEGATIVE: Int

The identifier for the negative button.

Value: -2

BUTTON_NEUTRAL

Added in API level 3
static val BUTTON_NEUTRAL: Int

The identifier for the neutral button.

Value: -3

BUTTON_POSITIVE

Added in API level 3
static val BUTTON_POSITIVE: Int

The identifier for the positive button.

Value: -1

Public methods

cancel

Added in API level 1
abstract fun cancel(): Unit

Cancels the dialog, invoking the OnCancelListener.

The OnDismissListener may also be called if cancellation dismisses the dialog.

dismiss

Added in API level 1
abstract fun dismiss(): Unit

Dismisses the dialog, invoking the OnDismissListener.