# CharacterPickerDialog

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# CharacterPickerDialog

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/text/method/CharacterPickerDialog "View this page in Java")  

```
open class CharacterPickerDialog : Dialog, AdapterView.OnItemClickListener, View.OnClickListener
```

|---|---|----------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                            |||
| ↳ | [android.app.Dialog](https://developer.android.com/reference/kotlin/android/app/Dialog.html#)                                             ||
|   | ↳ | [android.text.method.CharacterPickerDialog](https://developer.android.com/reference/kotlin/android/text/method/CharacterPickerDialog#) |

Dialog for choosing accented characters related to a base character.

## Summary

| Inherited constants ||
|---|---|
| From class[DialogInterface](https://developer.android.com/reference/kotlin/android/content/DialogInterface.html#) |----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [BUTTON1](https://developer.android.com/reference/kotlin/android/content/DialogInterface.html#BUTTON1:kotlin.Int) <br />                                                                | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [BUTTON2](https://developer.android.com/reference/kotlin/android/content/DialogInterface.html#BUTTON2:kotlin.Int) <br />                                                                | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [BUTTON3](https://developer.android.com/reference/kotlin/android/content/DialogInterface.html#BUTTON3:kotlin.Int) <br />                                                                | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [BUTTON_NEGATIVE](https://developer.android.com/reference/kotlin/android/content/DialogInterface.html#BUTTON_NEGATIVE:kotlin.Int) <br /> The identifier for the negative button. <br /> | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [BUTTON_NEUTRAL](https://developer.android.com/reference/kotlin/android/content/DialogInterface.html#BUTTON_NEUTRAL:kotlin.Int) <br /> The identifier for the neutral button. <br />    | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [BUTTON_POSITIVE](https://developer.android.com/reference/kotlin/android/content/DialogInterface.html#BUTTON_POSITIVE:kotlin.Int) <br /> The identifier for the positive button. <br /> | ||

|                                                                                                                                                                                                                                                                                                                                                                                                                                               Public constructors                                                                                                                                                                                                                                                                                                                                                                                                                                                ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [CharacterPickerDialog](https://developer.android.com/reference/kotlin/android/text/method/CharacterPickerDialog#CharacterPickerDialog(android.content.Context,%20android.view.View,%20android.text.Editable,%20kotlin.String,%20kotlin.Boolean))`(`context:` `[Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!`, `view:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)!`, `text:` `[Editable](https://developer.android.com/reference/kotlin/android/text/Editable.html#)!`, `options:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `insert:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Creates a new CharacterPickerDialog that presents the specified`options`for insertion or replacement (depending on the sense of`insert`) into`text`. |

|                                                                                                                                                                                                                                                                                                                                                                                                 Public methods                                                                                                                                                                                                                                                                                                                                                                                                  ||
|----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onClick](https://developer.android.com/reference/kotlin/android/text/method/CharacterPickerDialog#onClick(android.view.View))`(`v:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)!`)` Handles clicks on the Cancel button.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onItemClick](https://developer.android.com/reference/kotlin/android/text/method/CharacterPickerDialog#onItemClick(android.widget.AdapterView,%20android.view.View,%20kotlin.Int,%20kotlin.Long))`(`parent:` `[AdapterView](https://developer.android.com/reference/kotlin/android/widget/AdapterView.html#)<[Adapter](https://developer.android.com/reference/kotlin/android/widget/Adapter.html#)!>!`, `view:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)!`, `position:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `id:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` Handles clicks on the character buttons. |

|                                                                                                                                                           Protected methods                                                                                                                                                            ||
|----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onCreate](https://developer.android.com/reference/kotlin/android/text/method/CharacterPickerDialog#onCreate(android.os.Bundle))`(`savedInstanceState:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!`)` <br /> |

| Inherited functions ||
|---|---|
| From class[Dialog](https://developer.android.com/reference/kotlin/android/app/Dialog.html#) |------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [addContentView](https://developer.android.com/reference/kotlin/android/app/Dialog.html#addContentView(android.view.View,%20android.view.ViewGroup.LayoutParams))`(`view:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)`, `params:` `[ViewGroup.LayoutParams](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#)?`)` <br /> Add an additional content view to the screen. Added after any existing ones in the screen -- existing views are NOT removed. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [cancel](https://developer.android.com/reference/kotlin/android/app/Dialog.html#cancel())`()` <br /> Cancel the dialog. This is essentially the same as calling[dismiss()](https://developer.android.com/reference/kotlin/android/app/Dialog.html#dismiss()), but it will also call your[DialogInterface.OnCancelListener](https://developer.android.com/reference/kotlin/android/content/DialogInterface.OnCancelListener.html#)(if registered). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [closeOptionsMenu](https://developer.android.com/reference/kotlin/android/app/Dialog.html#closeOptionsMenu())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [create](https://developer.android.com/reference/kotlin/android/app/Dialog.html#create())`()` <br /> Forces immediate creation of the dialog. Note that you should not override this method to perform dialog creation. Rather, override[onCreate(android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onCreate(android.os.Bundle)). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [dismiss](https://developer.android.com/reference/kotlin/android/app/Dialog.html#dismiss())`()` <br /> Dismiss this dialog, removing it from the screen. This method can be invoked safely from any thread. Note that you should not override this method to do cleanup when the dialog is dismissed, instead implement that in[onStop](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onStop()). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [dispatchGenericMotionEvent](https://developer.android.com/reference/kotlin/android/app/Dialog.html#dispatchGenericMotionEvent(android.view.MotionEvent))`(`ev:` `[MotionEvent](https://developer.android.com/reference/kotlin/android/view/MotionEvent.html#)`)` <br /> Called to process generic motion events. You can override this to intercept all generic motion events before they are dispatched to the window. Be sure to call this implementation for generic motion events that should be handled normally. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [dispatchKeyEvent](https://developer.android.com/reference/kotlin/android/app/Dialog.html#dispatchKeyEvent(android.view.KeyEvent))`(`event:` `[KeyEvent](https://developer.android.com/reference/kotlin/android/view/KeyEvent.html#)`)` <br /> Called to process key events. You can override this to intercept all key events before they are dispatched to the window. Be sure to call this implementation for key events that should be handled normally. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [dispatchKeyShortcutEvent](https://developer.android.com/reference/kotlin/android/app/Dialog.html#dispatchKeyShortcutEvent(android.view.KeyEvent))`(`event:` `[KeyEvent](https://developer.android.com/reference/kotlin/android/view/KeyEvent.html#)`)` <br /> Called to process a key shortcut event. You can override this to intercept all key shortcut events before they are dispatched to the window. Be sure to call this implementation for key shortcut events that should be handled normally. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [dispatchPopulateAccessibilityEvent](https://developer.android.com/reference/kotlin/android/app/Dialog.html#dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent))`(`event:` `[AccessibilityEvent](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityEvent.html#)`)` <br /> Called to process population of[AccessibilityEvent](https://developer.android.com/reference/kotlin/android/view/accessibility/AccessibilityEvent.html#)s. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [dispatchTouchEvent](https://developer.android.com/reference/kotlin/android/app/Dialog.html#dispatchTouchEvent(android.view.MotionEvent))`(`ev:` `[MotionEvent](https://developer.android.com/reference/kotlin/android/view/MotionEvent.html#)`)` <br /> Called to process touch screen events. You can override this to intercept all touch screen events before they are dispatched to the window. Be sure to call this implementation for touch screen events that should be handled normally. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [dispatchTrackballEvent](https://developer.android.com/reference/kotlin/android/app/Dialog.html#dispatchTrackballEvent(android.view.MotionEvent))`(`ev:` `[MotionEvent](https://developer.android.com/reference/kotlin/android/view/MotionEvent.html#)`)` <br /> Called to process trackball events. You can override this to intercept all trackball events before they are dispatched to the window. Be sure to call this implementation for trackball events that should be handled normally. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | T                                                                                                                      | [findViewById](https://developer.android.com/reference/kotlin/android/app/Dialog.html#findViewById(kotlin.Int))`(`id:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Finds the first descendant view with the given ID or`null`if the ID is invalid (\< 0), there is no matching view in the hierarchy, or the dialog has not yet been fully created (for example, via[show()](https://developer.android.com/reference/kotlin/android/app/Dialog.html#show())or[create()](https://developer.android.com/reference/kotlin/android/app/Dialog.html#create())). **Note:**In most cases -- depending on compiler support -- the resulting view is automatically cast to the target class type. If the target class type is unconstrained, an explicit cast may be necessary. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [ActionBar](https://developer.android.com/reference/kotlin/android/app/ActionBar.html#)?                               | [getActionBar](https://developer.android.com/reference/kotlin/android/app/Dialog.html#getActionBar())`()` <br /> Retrieve the[ActionBar](https://developer.android.com/reference/kotlin/android/app/ActionBar.html#)attached to this dialog, if present. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)                                | [getContext](https://developer.android.com/reference/kotlin/android/app/Dialog.html#getContext())`()` <br /> Retrieve the Context this Dialog is running in. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [View](https://developer.android.com/reference/kotlin/android/view/View.html#)?                                        | [getCurrentFocus](https://developer.android.com/reference/kotlin/android/app/Dialog.html#getCurrentFocus())`()` <br /> Call[android.view.Window#getCurrentFocus](https://developer.android.com/reference/kotlin/android/view/Window.html#getCurrentFocus())on the Window if this Activity to return the currently focused view. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [LayoutInflater](https://developer.android.com/reference/kotlin/android/view/LayoutInflater.html#)                     | [getLayoutInflater](https://developer.android.com/reference/kotlin/android/app/Dialog.html#getLayoutInflater())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [OnBackInvokedDispatcher](https://developer.android.com/reference/kotlin/android/window/OnBackInvokedDispatcher.html#) | [getOnBackInvokedDispatcher](https://developer.android.com/reference/kotlin/android/app/Dialog.html#getOnBackInvokedDispatcher())`()` <br /> Returns the[OnBackInvokedDispatcher](https://developer.android.com/reference/kotlin/android/window/OnBackInvokedDispatcher.html#)instance associated with the window that this dialog is attached to. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Activity](https://developer.android.com/reference/kotlin/android/app/Activity.html#)?                                 | [getOwnerActivity](https://developer.android.com/reference/kotlin/android/app/Dialog.html#getOwnerActivity())`()` <br /> Returns the Activity that owns this Dialog. For example, if[Activity.showDialog(int)](https://developer.android.com/reference/kotlin/android/app/Activity.html#showDialog(kotlin.Int))is used to show this Dialog, that Activity will be the owner (by default). Depending on how this dialog was created, this may return null. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [SearchEvent](https://developer.android.com/reference/kotlin/android/view/SearchEvent.html#)?                          | [getSearchEvent](https://developer.android.com/reference/kotlin/android/app/Dialog.html#getSearchEvent())`()` <br /> During the onSearchRequested() callbacks, this function will return the[SearchEvent](https://developer.android.com/reference/kotlin/android/view/SearchEvent.html#)that triggered the callback, if it exists. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                             | [getVolumeControlStream](https://developer.android.com/reference/kotlin/android/app/Dialog.html#getVolumeControlStream())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Window](https://developer.android.com/reference/kotlin/android/view/Window.html#)?                                    | [getWindow](https://developer.android.com/reference/kotlin/android/app/Dialog.html#getWindow())`()` <br /> Retrieve the current Window for the activity. This can be used to directly access parts of the Window API that are not available through Activity/Screen. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [hide](https://developer.android.com/reference/kotlin/android/app/Dialog.html#hide())`()` <br /> Hide the dialog, but do not dismiss it. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [invalidateOptionsMenu](https://developer.android.com/reference/kotlin/android/app/Dialog.html#invalidateOptionsMenu())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [isShowing](https://developer.android.com/reference/kotlin/android/app/Dialog.html#isShowing())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [onActionModeFinished](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onActionModeFinished(android.view.ActionMode))`(`mode:` `[ActionMode](https://developer.android.com/reference/kotlin/android/view/ActionMode.html#)!`)` <br /> Called when an action mode has been finished. The appropriate mode callback method will have already been invoked. Note that if you override this method you should always call through to the superclass implementation by calling super.onActionModeFinished(mode). If you override this method you*must*call through to the superclass implementation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [onActionModeStarted](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onActionModeStarted(android.view.ActionMode))`(`mode:` `[ActionMode](https://developer.android.com/reference/kotlin/android/view/ActionMode.html#)!`)` <br /> Called when an action mode has been started. The appropriate mode callback method will have already been invoked. Note that if you override this method you should always call through to the superclass implementation by calling super.onActionModeStarted(mode). If you override this method you*must*call through to the superclass implementation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [onAttachedToWindow](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onAttachedToWindow())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [onBackPressed](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onBackPressed())`()` <br /> Called when the dialog has detected the user's press of the back key. The default implementation simply cancels the dialog (only if it is cancelable), but you can override this to do whatever you want. If you target version[android.os.Build.VERSION_CODES#TIRAMISU](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#TIRAMISU:kotlin.Int)or later, you should not use this method but register an[OnBackInvokedCallback](https://developer.android.com/reference/kotlin/android/window/OnBackInvokedCallback.html#)on an[OnBackInvokedDispatcher](https://developer.android.com/reference/kotlin/android/window/OnBackInvokedDispatcher.html#)that you can retrieve using[getOnBackInvokedDispatcher()](https://developer.android.com/reference/kotlin/android/app/Dialog.html#getOnBackInvokedDispatcher()). You should also set`android:enableOnBackInvokedCallback="true"`in the application manifest. Alternatively, you can use`androidx.activity.ComponentDialog#getOnBackPressedDispatcher()`for backward compatibility. <br />                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [onContentChanged](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onContentChanged())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [onContextItemSelected](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onContextItemSelected(android.view.MenuItem))`(`item:` `[MenuItem](https://developer.android.com/reference/kotlin/android/view/MenuItem.html#)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [onContextMenuClosed](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onContextMenuClosed(android.view.Menu))`(`menu:` `[Menu](https://developer.android.com/reference/kotlin/android/view/Menu.html#)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [onCreateContextMenu](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onCreateContextMenu(android.view.ContextMenu,%20android.view.View,%20android.view.ContextMenu.ContextMenuInfo))`(`menu:` `[ContextMenu](https://developer.android.com/reference/kotlin/android/view/ContextMenu.html#)!`, `v:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)!`, `menuInfo:` `[ContextMenu.ContextMenuInfo](https://developer.android.com/reference/kotlin/android/view/ContextMenu.ContextMenuInfo.html#)!`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [onCreateOptionsMenu](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onCreateOptionsMenu(android.view.Menu))`(`menu:` `[Menu](https://developer.android.com/reference/kotlin/android/view/Menu.html#)`)` <br /> It is usually safe to proxy this call to the owner activity's[Activity.onCreateOptionsMenu(Menu)](https://developer.android.com/reference/kotlin/android/app/Activity.html#onCreateOptionsMenu(android.view.Menu))if the client desires the same menu for this Dialog. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [onCreatePanelMenu](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onCreatePanelMenu(kotlin.Int,%20android.view.Menu))`(`featureId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `menu:` `[Menu](https://developer.android.com/reference/kotlin/android/view/Menu.html#)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [View](https://developer.android.com/reference/kotlin/android/view/View.html#)?                                        | [onCreatePanelView](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onCreatePanelView(kotlin.Int))`(`featureId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [onDetachedFromWindow](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onDetachedFromWindow())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [onGenericMotionEvent](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onGenericMotionEvent(android.view.MotionEvent))`(`event:` `[MotionEvent](https://developer.android.com/reference/kotlin/android/view/MotionEvent.html#)`)` <br /> Called when a generic motion event was not handled by any of the views inside of the dialog. Generic motion events describe joystick movements, mouse hovers, track pad touches, scroll wheel movements and other input events. The[source](https://developer.android.com/reference/kotlin/android/view/MotionEvent.html#getSource())of the motion event specifies the class of input that was received. Implementations of this method must examine the bits in the source before processing the event. The following code example shows how this is done. Generic motion events with source class[android.view.InputDevice#SOURCE_CLASS_POINTER](https://developer.android.com/reference/kotlin/android/view/InputDevice.html#SOURCE_CLASS_POINTER:kotlin.Int)are delivered to the view under the pointer. All other generic motion events are delivered to the focused view. See[View.onGenericMotionEvent(MotionEvent)](https://developer.android.com/reference/kotlin/android/view/View.html#onGenericMotionEvent(android.view.MotionEvent))for an example of how to handle this event. <br /> | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [onKeyDown](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onKeyDown(kotlin.Int,%20android.view.KeyEvent))`(`keyCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `event:` `[KeyEvent](https://developer.android.com/reference/kotlin/android/view/KeyEvent.html#)`)` <br /> A key was pressed down. If the focused view didn't want this event, this method is called. Default implementation consumes[KEYCODE_BACK](https://developer.android.com/reference/kotlin/android/view/KeyEvent.html#KEYCODE_BACK:kotlin.Int)and, as of[P](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#P:kotlin.Int),[KEYCODE_ESCAPE](https://developer.android.com/reference/kotlin/android/view/KeyEvent.html#KEYCODE_ESCAPE:kotlin.Int)to later handle them in[onKeyUp](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onKeyUp(kotlin.Int,%20android.view.KeyEvent)). <br />                                                                                                                                                                                                                                                                                                                                                                                | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [onKeyLongPress](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onKeyLongPress(kotlin.Int,%20android.view.KeyEvent))`(`keyCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `event:` `[KeyEvent](https://developer.android.com/reference/kotlin/android/view/KeyEvent.html#)`)` <br /> Default implementation of[KeyEvent.Callback.onKeyLongPress()](https://developer.android.com/reference/kotlin/android/view/KeyEvent.Callback.html#onKeyLongPress(kotlin.Int,%20android.view.KeyEvent)): always returns false (doesn't handle the event). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [onKeyMultiple](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onKeyMultiple(kotlin.Int,%20kotlin.Int,%20android.view.KeyEvent))`(`keyCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `repeatCount:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `event:` `[KeyEvent](https://developer.android.com/reference/kotlin/android/view/KeyEvent.html#)`)` <br /> Default implementation of[KeyEvent.Callback.onKeyMultiple()](https://developer.android.com/reference/kotlin/android/view/KeyEvent.Callback.html#onKeyMultiple(kotlin.Int,%20kotlin.Int,%20android.view.KeyEvent)): always returns false (doesn't handle the event). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [onKeyShortcut](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onKeyShortcut(kotlin.Int,%20android.view.KeyEvent))`(`keyCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `event:` `[KeyEvent](https://developer.android.com/reference/kotlin/android/view/KeyEvent.html#)`)` <br /> Called when a key shortcut event is not handled by any of the views in the Dialog. Override this method to implement global key shortcuts for the Dialog. Key shortcuts can also be implemented by setting the[shortcut](https://developer.android.com/reference/kotlin/android/view/MenuItem.html#setShortcut(kotlin.Char,%20kotlin.Char))property of menu items. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [onKeyUp](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onKeyUp(kotlin.Int,%20android.view.KeyEvent))`(`keyCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `event:` `[KeyEvent](https://developer.android.com/reference/kotlin/android/view/KeyEvent.html#)`)` <br /> A key was released. Default implementation consumes[KEYCODE_BACK](https://developer.android.com/reference/kotlin/android/view/KeyEvent.html#KEYCODE_BACK:kotlin.Int)and, as of[P](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#P:kotlin.Int),[KEYCODE_ESCAPE](https://developer.android.com/reference/kotlin/android/view/KeyEvent.html#KEYCODE_ESCAPE:kotlin.Int)to close the dialog. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [onMenuItemSelected](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onMenuItemSelected(kotlin.Int,%20android.view.MenuItem))`(`featureId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `item:` `[MenuItem](https://developer.android.com/reference/kotlin/android/view/MenuItem.html#)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [onMenuOpened](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onMenuOpened(kotlin.Int,%20android.view.Menu))`(`featureId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `menu:` `[Menu](https://developer.android.com/reference/kotlin/android/view/Menu.html#)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [onOptionsItemSelected](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onOptionsItemSelected(android.view.MenuItem))`(`item:` `[MenuItem](https://developer.android.com/reference/kotlin/android/view/MenuItem.html#)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [onOptionsMenuClosed](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onOptionsMenuClosed(android.view.Menu))`(`menu:` `[Menu](https://developer.android.com/reference/kotlin/android/view/Menu.html#)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [onPanelClosed](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onPanelClosed(kotlin.Int,%20android.view.Menu))`(`featureId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `menu:` `[Menu](https://developer.android.com/reference/kotlin/android/view/Menu.html#)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [onPrepareOptionsMenu](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onPrepareOptionsMenu(android.view.Menu))`(`menu:` `[Menu](https://developer.android.com/reference/kotlin/android/view/Menu.html#)`)` <br /> It is usually safe to proxy this call to the owner activity's[Activity.onPrepareOptionsMenu(Menu)](https://developer.android.com/reference/kotlin/android/app/Activity.html#onPrepareOptionsMenu(android.view.Menu))if the client desires the same menu for this Dialog. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [onPreparePanel](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onPreparePanel(kotlin.Int,%20android.view.View,%20android.view.Menu))`(`featureId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `view:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)?`, `menu:` `[Menu](https://developer.android.com/reference/kotlin/android/view/Menu.html#)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [onRestoreInstanceState](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onRestoreInstanceState(android.os.Bundle))`(`savedInstanceState:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)`)` <br /> Restore the state of the dialog from a previously saved bundle. The default implementation restores the state of the dialog's view hierarchy that was saved in the default implementation of[onSaveInstanceState()](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onSaveInstanceState()), so be sure to call through to super when overriding unless you want to do all restoring of state yourself. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)                                       | [onSaveInstanceState](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onSaveInstanceState())`()` <br /> Saves the state of the dialog into a bundle. The default implementation saves the state of its view hierarchy, so you'll likely want to call through to super if you override this to save additional state. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [onSearchRequested](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onSearchRequested())`()` <br /> This hook is called when the user signals the desire to start a search. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [onSearchRequested](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onSearchRequested(android.view.SearchEvent))`(`searchEvent:` `[SearchEvent](https://developer.android.com/reference/kotlin/android/view/SearchEvent.html#)`)` <br /> This hook is called when the user signals the desire to start a search. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [onStart](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onStart())`()` <br /> Called when the dialog is starting. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [onStop](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onStop())`()` <br /> Called to tell you that you're stopping. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [onTouchEvent](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onTouchEvent(android.view.MotionEvent))`(`event:` `[MotionEvent](https://developer.android.com/reference/kotlin/android/view/MotionEvent.html#)`)` <br /> Called when a touch screen event was not handled by any of the views under it. This is most useful to process touch events that happen outside of your window bounds, where there is no view to receive it. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [onTrackballEvent](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onTrackballEvent(android.view.MotionEvent))`(`event:` `[MotionEvent](https://developer.android.com/reference/kotlin/android/view/MotionEvent.html#)`)` <br /> Called when the trackball was moved and not handled by any of the views inside of the activity. So, for example, if the trackball moves while focus is on a button, you will receive a call here because buttons do not normally do anything with trackball events. The call here happens*before*trackball movements are converted to DPAD key events, which then get sent back to the view hierarchy, and will be processed at the point for things like focus navigation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [onWindowAttributesChanged](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onWindowAttributesChanged(android.view.WindowManager.LayoutParams))`(`params:` `[WindowManager.LayoutParams](https://developer.android.com/reference/kotlin/android/view/WindowManager.LayoutParams.html#)!`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [onWindowFocusChanged](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onWindowFocusChanged(kotlin.Boolean))`(`hasFocus:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [ActionMode](https://developer.android.com/reference/kotlin/android/view/ActionMode.html#)?                            | [onWindowStartingActionMode](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onWindowStartingActionMode(android.view.ActionMode.Callback))`(`callback:` `[ActionMode.Callback](https://developer.android.com/reference/kotlin/android/view/ActionMode.Callback.html#)!`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [ActionMode](https://developer.android.com/reference/kotlin/android/view/ActionMode.html#)?                            | [onWindowStartingActionMode](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onWindowStartingActionMode(android.view.ActionMode.Callback,%20kotlin.Int))`(`callback:` `[ActionMode.Callback](https://developer.android.com/reference/kotlin/android/view/ActionMode.Callback.html#)!`, `type:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [openContextMenu](https://developer.android.com/reference/kotlin/android/app/Dialog.html#openContextMenu(android.view.View))`(`view:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [openOptionsMenu](https://developer.android.com/reference/kotlin/android/app/Dialog.html#openOptionsMenu())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [registerForContextMenu](https://developer.android.com/reference/kotlin/android/app/Dialog.html#registerForContextMenu(android.view.View))`(`view:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                     | [requestWindowFeature](https://developer.android.com/reference/kotlin/android/app/Dialog.html#requestWindowFeature(kotlin.Int))`(`featureId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Enable extended window features. This is a convenience for calling[getWindow().requestFeature()](https://developer.android.com/reference/kotlin/android/view/Window.html#requestFeature(kotlin.Int)). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | T                                                                                                                      | [requireViewById](https://developer.android.com/reference/kotlin/android/app/Dialog.html#requireViewById(kotlin.Int))`(`id:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Finds the first descendant view with the given ID or throws an IllegalArgumentException if the ID is invalid (\< 0), there is no matching view in the hierarchy, or the dialog has not yet been fully created (for example, via[show()](https://developer.android.com/reference/kotlin/android/app/Dialog.html#show())or[create()](https://developer.android.com/reference/kotlin/android/app/Dialog.html#create())). **Note:**In most cases -- depending on compiler support -- the resulting view is automatically cast to the target class type. If the target class type is unconstrained, an explicit cast may be necessary. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [setCancelMessage](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setCancelMessage(android.os.Message))`(`msg:` `[Message](https://developer.android.com/reference/kotlin/android/os/Message.html#)?`)` <br /> Set a message to be sent when the dialog is canceled. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [setCancelable](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setCancelable(kotlin.Boolean))`(`flag:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` <br /> Sets whether this dialog is cancelable with the[BACK](https://developer.android.com/reference/kotlin/android/view/KeyEvent.html#KEYCODE_BACK:kotlin.Int)key. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [setCanceledOnTouchOutside](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setCanceledOnTouchOutside(kotlin.Boolean))`(`cancel:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` <br /> Sets whether this dialog is canceled when touched outside the window's bounds. If setting to true, the dialog is set to be cancelable if not already set. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [setContentView](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setContentView(android.view.View))`(`view:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)`)` <br /> Set the screen content to an explicit view. This view is placed directly into the screen's view hierarchy. It can itself be a complex view hierarchy. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [setContentView](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setContentView(android.view.View,%20android.view.ViewGroup.LayoutParams))`(`view:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)`, `params:` `[ViewGroup.LayoutParams](https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams.html#)?`)` <br /> Set the screen content to an explicit view. This view is placed directly into the screen's view hierarchy. It can itself be a complex view hierarchy. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [setContentView](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setContentView(kotlin.Int))`(`layoutResID:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Set the screen content from a layout resource. The resource will be inflated, adding all top-level views to the screen. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [setDismissMessage](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setDismissMessage(android.os.Message))`(`msg:` `[Message](https://developer.android.com/reference/kotlin/android/os/Message.html#)?`)` <br /> Set a message to be sent when the dialog is dismissed. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [setFeatureDrawable](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setFeatureDrawable(kotlin.Int,%20android.graphics.drawable.Drawable))`(`featureId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `drawable:` `[Drawable](https://developer.android.com/reference/kotlin/android/graphics/drawable/Drawable.html#)?`)` <br /> Convenience for calling[android.view.Window#setFeatureDrawable(int, Drawable)](https://developer.android.com/reference/kotlin/android/view/Window.html#setFeatureDrawable(kotlin.Int,%20android.graphics.drawable.Drawable)). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [setFeatureDrawableAlpha](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setFeatureDrawableAlpha(kotlin.Int,%20kotlin.Int))`(`featureId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `alpha:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Convenience for calling[android.view.Window#setFeatureDrawableAlpha](https://developer.android.com/reference/kotlin/android/view/Window.html#setFeatureDrawableAlpha(kotlin.Int,%20kotlin.Int)). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [setFeatureDrawableResource](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setFeatureDrawableResource(kotlin.Int,%20kotlin.Int))`(`featureId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `resId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Convenience for calling[android.view.Window#setFeatureDrawableResource](https://developer.android.com/reference/kotlin/android/view/Window.html#setFeatureDrawableResource(kotlin.Int,%20kotlin.Int)). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [setFeatureDrawableUri](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setFeatureDrawableUri(kotlin.Int,%20android.net.Uri))`(`featureId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)?`)` <br /> Convenience for calling[android.view.Window#setFeatureDrawableUri](https://developer.android.com/reference/kotlin/android/view/Window.html#setFeatureDrawableUri(kotlin.Int,%20android.net.Uri)). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [setOnCancelListener](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setOnCancelListener(android.content.DialogInterface.OnCancelListener))`(`listener:` `[DialogInterface.OnCancelListener](https://developer.android.com/reference/kotlin/android/content/DialogInterface.OnCancelListener.html#)?`)` <br /> Set a listener to be invoked when the dialog is canceled. This will only be invoked when the dialog is canceled. Cancel events alone will not capture all ways that the dialog might be dismissed. If the creator needs to know when a dialog is dismissed in general, use[setOnDismissListener](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setOnDismissListener(android.content.DialogInterface.OnDismissListener)). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [setOnDismissListener](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setOnDismissListener(android.content.DialogInterface.OnDismissListener))`(`listener:` `[DialogInterface.OnDismissListener](https://developer.android.com/reference/kotlin/android/content/DialogInterface.OnDismissListener.html#)?`)` <br /> Set a listener to be invoked when the dialog is dismissed. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [setOnKeyListener](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setOnKeyListener(android.content.DialogInterface.OnKeyListener))`(`onKeyListener:` `[DialogInterface.OnKeyListener](https://developer.android.com/reference/kotlin/android/content/DialogInterface.OnKeyListener.html#)?`)` <br /> Sets the callback that will be called if a key is dispatched to the dialog. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [setOnShowListener](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setOnShowListener(android.content.DialogInterface.OnShowListener))`(`listener:` `[DialogInterface.OnShowListener](https://developer.android.com/reference/kotlin/android/content/DialogInterface.OnShowListener.html#)?`)` <br /> Sets a listener to be invoked when the dialog is shown. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [setOwnerActivity](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setOwnerActivity(android.app.Activity))`(`activity:` `[Activity](https://developer.android.com/reference/kotlin/android/app/Activity.html#)`)` <br /> Sets the Activity that owns this dialog. An example use: This Dialog will use the suggested volume control stream of the Activity. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [setTitle](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setTitle(kotlin.Int))`(`titleId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Set the title text for this dialog's window. The text is retrieved from the resources with the supplied identifier. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [setTitle](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setTitle(kotlin.CharSequence))`(`title:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)?`)` <br /> Set the title text for this dialog's window. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [setVolumeControlStream](https://developer.android.com/reference/kotlin/android/app/Dialog.html#setVolumeControlStream(kotlin.Int))`(`streamType:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> By default, this will use the owner Activity's suggested stream type. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [show](https://developer.android.com/reference/kotlin/android/app/Dialog.html#show())`()` <br /> Start the dialog and display it on screen. The window is placed in the application layer and opaque. Note that you should not override this method to do initialization when the dialog is shown, instead implement that in[onStart](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onStart()). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [takeKeyEvents](https://developer.android.com/reference/kotlin/android/app/Dialog.html#takeKeyEvents(kotlin.Boolean))`(`get:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` <br /> Request that key events come to this dialog. Use this if your dialog has no views with focus, but the dialog still wants a chance to process key events. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                           | [unregisterForContextMenu](https://developer.android.com/reference/kotlin/android/app/Dialog.html#unregisterForContextMenu(android.view.View))`(`view:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | ||
| From class[Callback](https://developer.android.com/reference/kotlin/android/view/Window.Callback.html#) |------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onPointerCaptureChanged](https://developer.android.com/reference/kotlin/android/view/Window.Callback.html#onPointerCaptureChanged(kotlin.Boolean))`(`hasCapture:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` <br /> Called when pointer capture is enabled or disabled for the current window. <br />                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onProvideKeyboardShortcuts](https://developer.android.com/reference/kotlin/android/view/Window.Callback.html#onProvideKeyboardShortcuts(kotlin.collections.MutableList,%20android.view.Menu,%20kotlin.Int))`(`data:` `[MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)<[KeyboardShortcutGroup](https://developer.android.com/reference/kotlin/android/view/KeyboardShortcutGroup.html#)!>!`, `menu:` `[Menu](https://developer.android.com/reference/kotlin/android/view/Menu.html#)?`, `deviceId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Called when Keyboard Shortcuts are requested for the current window. <br /> | ||

## Public constructors

### CharacterPickerDialog

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
CharacterPickerDialog(
    context: Context!, 
    view: View!, 
    text: Editable!, 
    options: String!, 
    insert: Boolean)
```

Creates a new CharacterPickerDialog that presents the specified`options`for insertion or replacement (depending on the sense of`insert`) into`text`.

## Public methods

### onClick

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onClick(v: View!): Unit
```

Handles clicks on the Cancel button.

|                                                   Parameters                                                    ||
|-----|------------------------------------------------------------------------------------------------------------|
| `v` | [View](https://developer.android.com/reference/kotlin/android/view/View.html#)!:The view that was clicked. |

### onItemClick

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onItemClick(
    parent: AdapterView<Adapter!>!, 
    view: View!, 
    position: Int, 
    id: Long
): Unit
```

Handles clicks on the character buttons.

|                                                                                                                    Parameters                                                                                                                    ||
|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `parent`   | [AdapterView](https://developer.android.com/reference/kotlin/android/widget/AdapterView.html#)\<[Adapter](https://developer.android.com/reference/kotlin/android/widget/Adapter.html#)!\>!:The AdapterView where the click happened. |
| `view`     | [View](https://developer.android.com/reference/kotlin/android/view/View.html#)!:The view within the AdapterView that was clicked (this will be a view provided by the adapter)                                                       |
| `position` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The position of the view in the adapter.                                                                                                                  |
| `id`       | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html):The row id of the item that was clicked.                                                                                                                |

## Protected methods

### onCreate

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
protected open fun onCreate(savedInstanceState: Bundle!): Unit
```

|                                                                                                                                                                                                Parameters                                                                                                                                                                                                 ||
|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `savedInstanceState` | [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!:If this dialog is being reinitialized after a the hosting activity was previously shut down, holds the result from the most recent call to[onSaveInstanceState](https://developer.android.com/reference/kotlin/android/app/Dialog.html#onSaveInstanceState()), or null if this is the first time. |