# AppCompatDialog

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:appcompat-v7:28.0.0-alpha1  
Summary:[Inherited Constants](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#inhconstants)\|[Ctors](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#pubctors)\|[Protected Ctors](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#proctors)\|[Methods](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#pubmethods)\|[Protected Methods](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#promethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#)  

# AppCompatDialog

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


class
AppCompatDialog
`  
`


``

extends `[Dialog](https://developer.android.com/reference/android/app/Dialog.html)`


``


implements

`[AppCompatCallback](https://developer.android.com/reference/android/support/v7/app/AppCompatCallback)`


`

|---|---|----------------------------------------|
| java.lang.Object                             |||
| ↳ | [android.app.Dialog](https://developer.android.com/reference/android/app/Dialog.html) ||
|   | ↳ | android.support.v7.app.AppCompatDialog |

|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#)Known Direct Subclasses [AlertDialog](https://developer.android.com/reference/android/support/v7/app/AlertDialog),[MediaRouteChooserDialog](https://developer.android.com/reference/android/support/v7/app/MediaRouteChooserDialog) |-------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------| | [AlertDialog](https://developer.android.com/reference/android/support/v7/app/AlertDialog)                         | A subclass of Dialog that can display one, two or three buttons.                                                                               | | [MediaRouteChooserDialog](https://developer.android.com/reference/android/support/v7/app/MediaRouteChooserDialog) | This class implements the route chooser dialog for[MediaRouter](https://developer.android.com/reference/android/support/v7/media/MediaRouter). | |

|---|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#)Known Indirect Subclasses [MediaRouteControllerDialog](https://developer.android.com/reference/android/support/v7/app/MediaRouteControllerDialog) |-------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------| | [MediaRouteControllerDialog](https://developer.android.com/reference/android/support/v7/app/MediaRouteControllerDialog) | This class implements the route controller dialog for[MediaRouter](https://developer.android.com/reference/android/support/v7/media/MediaRouter). | ||

<br />

*** ** * ** ***

Base class for AppCompat themed[Dialog](https://developer.android.com/reference/android/app/Dialog.html)s.

## Summary

|                                                                                                                                                                                                                                  ### Inherited constants                                                                                                                                                                                                                                  |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#)From interface` android.content.DialogInterface ` |-------|--------------------------| | `int` | `BUTTON1` <br />         | | `int` | `BUTTON2` <br />         | | `int` | `BUTTON3` <br />         | | `int` | `BUTTON_NEGATIVE` <br /> | | `int` | `BUTTON_NEUTRAL` <br />  | | `int` | `BUTTON_POSITIVE` <br /> | |

|                                                                                                                    ### Public constructors                                                                                                                     ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[AppCompatDialog](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#AppCompatDialog(android.content.Context))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context) `                 |
| ` `[AppCompatDialog](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#AppCompatDialog(android.content.Context, int))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context, int theme) ` |

|                                                                                                                                                                                                                            ### Protected constructors                                                                                                                                                                                                                             ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[AppCompatDialog](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#AppCompatDialog(android.content.Context, boolean, android.content.DialogInterface.OnCancelListener))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context, boolean cancelable, `[DialogInterface.OnCancelListener](https://developer.android.com/reference/android/content/DialogInterface.OnCancelListener.html)` cancelListener) ` |

|                                                                                                                                                                                                                                              ### Public methods                                                                                                                                                                                                                                               ||
|----------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void`                                                                                                  | ` `[addContentView](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#addContentView(android.view.View, android.view.ViewGroup.LayoutParams))`(`[View](https://developer.android.com/reference/android/view/View.html)` view, `[ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html)` params) `                   |
| ` <T extends `[View](https://developer.android.com/reference/android/view/View.html)`> T`                | ` `[findViewById](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#findViewById(int))`(int id) `                                                                                                                                                                                                                                                                      |
| ` `[AppCompatDelegate](https://developer.android.com/reference/android/support/v7/app/AppCompatDelegate) | ` `[getDelegate](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#getDelegate())`() `                                                                                                                                                                                                                                                                                 |
| ` `[ActionBar](https://developer.android.com/reference/android/support/v7/app/ActionBar)                 | ` `[getSupportActionBar](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#getSupportActionBar())`() ` Support library version of[getActionBar()](https://developer.android.com/reference/android/app/Dialog.html#getActionBar()).                                                                                                                                     |
| ` void`                                                                                                  | ` `[onSupportActionModeFinished](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#onSupportActionModeFinished(android.support.v7.view.ActionMode))`(`[ActionMode](https://developer.android.com/reference/android/support/v7/view/ActionMode)` mode) ` Called when a support action mode has finished.                                                                |
| ` void`                                                                                                  | ` `[onSupportActionModeStarted](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#onSupportActionModeStarted(android.support.v7.view.ActionMode))`(`[ActionMode](https://developer.android.com/reference/android/support/v7/view/ActionMode)` mode) ` Called when a support action mode has been started.                                                              |
| ` `[ActionMode](https://developer.android.com/reference/android/support/v7/view/ActionMode)              | ` `[onWindowStartingSupportActionMode](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#onWindowStartingSupportActionMode(android.support.v7.view.ActionMode.Callback))`(`[ActionMode.Callback](https://developer.android.com/reference/android/support/v7/view/ActionMode.Callback)` callback) ` Called when a support action mode is being started for this window. |
| ` void`                                                                                                  | ` `[setContentView](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#setContentView(android.view.View))`(`[View](https://developer.android.com/reference/android/view/View.html)` view) `                                                                                                                                                                             |
| ` void`                                                                                                  | ` `[setContentView](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#setContentView(int))`(int layoutResID) `                                                                                                                                                                                                                                                         |
| ` void`                                                                                                  | ` `[setContentView](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#setContentView(android.view.View, android.view.ViewGroup.LayoutParams))`(`[View](https://developer.android.com/reference/android/view/View.html)` view, `[ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html)` params) `                   |
| ` void`                                                                                                  | ` `[setTitle](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#setTitle(java.lang.CharSequence))`(CharSequence title) `                                                                                                                                                                                                                                               |
| ` void`                                                                                                  | ` `[setTitle](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#setTitle(int))`(int titleId) `                                                                                                                                                                                                                                                                         |
| ` boolean`                                                                                               | ` `[supportRequestWindowFeature](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#supportRequestWindowFeature(int))`(int featureId) ` Enable extended support library window features.                                                                                                                                                                                |

|                                                                                                        ### Protected methods                                                                                                         ||
|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void` | ` `[onCreate](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#onCreate(android.os.Bundle))`(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` savedInstanceState) ` |
| ` void` | ` `[onStop](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#onStop())`() `                                                                                                                   |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#)From class` `[android.app.Dialog](https://developer.android.com/reference/android/app/Dialog.html)` ` |-------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` void`                                                                                         | ` addContentView(`[View](https://developer.android.com/reference/android/view/View.html)` arg0, `[ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html)` arg1) `                                                                                                             | | ` void`                                                                                         | ` cancel() `                                                                                                                                                                                                                                                                                                                     | | ` void`                                                                                         | ` closeOptionsMenu() `                                                                                                                                                                                                                                                                                                           | | ` void`                                                                                         | ` create() `                                                                                                                                                                                                                                                                                                                     | | ` void`                                                                                         | ` dismiss() `                                                                                                                                                                                                                                                                                                                    | | ` boolean`                                                                                      | ` dispatchGenericMotionEvent(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` arg0) `                                                                                                                                                                                                      | | ` boolean`                                                                                      | ` dispatchKeyEvent(`[KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html)` arg0) `                                                                                                                                                                                                                      | | ` boolean`                                                                                      | ` dispatchKeyShortcutEvent(`[KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html)` arg0) `                                                                                                                                                                                                              | | ` boolean`                                                                                      | ` dispatchPopulateAccessibilityEvent(`[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)` arg0) `                                                                                                                                                                  | | ` boolean`                                                                                      | ` dispatchTouchEvent(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` arg0) `                                                                                                                                                                                                              | | ` boolean`                                                                                      | ` dispatchTrackballEvent(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` arg0) `                                                                                                                                                                                                          | | ` <T extends `[View](https://developer.android.com/reference/android/view/View.html)`> T`       | ` findViewById(int arg0) `                                                                                                                                                                                                                                                                                                       | | ` `[ActionBar](https://developer.android.com/reference/android/app/ActionBar.html)              | ` getActionBar() `                                                                                                                                                                                                                                                                                                               | | ` final `[Context](https://developer.android.com/reference/android/content/Context.html)        | ` getContext() `                                                                                                                                                                                                                                                                                                                 | | ` `[View](https://developer.android.com/reference/android/view/View.html)                       | ` getCurrentFocus() `                                                                                                                                                                                                                                                                                                            | | ` `[LayoutInflater](https://developer.android.com/reference/android/view/LayoutInflater.html)   | ` getLayoutInflater() `                                                                                                                                                                                                                                                                                                          | | ` final `[Activity](https://developer.android.com/reference/android/app/Activity.html)          | ` getOwnerActivity() `                                                                                                                                                                                                                                                                                                           | | ` final `[SearchEvent](https://developer.android.com/reference/android/view/SearchEvent.html)   | ` getSearchEvent() `                                                                                                                                                                                                                                                                                                             | | ` final int`                                                                                    | ` getVolumeControlStream() `                                                                                                                                                                                                                                                                                                     | | ` `[Window](https://developer.android.com/reference/android/view/Window.html)                   | ` getWindow() `                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                         | ` hide() `                                                                                                                                                                                                                                                                                                                       | | ` void`                                                                                         | ` invalidateOptionsMenu() `                                                                                                                                                                                                                                                                                                      | | ` boolean`                                                                                      | ` isShowing() `                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                         | ` onActionModeFinished(`[ActionMode](https://developer.android.com/reference/android/view/ActionMode.html)` arg0) `                                                                                                                                                                                                              | | ` void`                                                                                         | ` onActionModeStarted(`[ActionMode](https://developer.android.com/reference/android/view/ActionMode.html)` arg0) `                                                                                                                                                                                                               | | ` void`                                                                                         | ` onAttachedToWindow() `                                                                                                                                                                                                                                                                                                         | | ` void`                                                                                         | ` onBackPressed() `                                                                                                                                                                                                                                                                                                              | | ` void`                                                                                         | ` onContentChanged() `                                                                                                                                                                                                                                                                                                           | | ` boolean`                                                                                      | ` onContextItemSelected(`[MenuItem](https://developer.android.com/reference/android/view/MenuItem.html)` arg0) `                                                                                                                                                                                                                 | | ` void`                                                                                         | ` onContextMenuClosed(`[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg0) `                                                                                                                                                                                                                           | | ` void`                                                                                         | ` onCreate(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                    | | ` void`                                                                                         | ` onCreateContextMenu(`[ContextMenu](https://developer.android.com/reference/android/view/ContextMenu.html)` arg0, `[View](https://developer.android.com/reference/android/view/View.html)` arg1, `[ContextMenu.ContextMenuInfo](https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.html)` arg2) ` | | ` boolean`                                                                                      | ` onCreateOptionsMenu(`[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg0) `                                                                                                                                                                                                                           | | ` boolean`                                                                                      | ` onCreatePanelMenu(int arg0, `[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg1) `                                                                                                                                                                                                                   | | ` `[View](https://developer.android.com/reference/android/view/View.html)                       | ` onCreatePanelView(int arg0) `                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                         | ` onDetachedFromWindow() `                                                                                                                                                                                                                                                                                                       | | ` boolean`                                                                                      | ` onGenericMotionEvent(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` arg0) `                                                                                                                                                                                                            | | ` boolean`                                                                                      | ` onKeyDown(int arg0, `[KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html)` arg1) `                                                                                                                                                                                                                   | | ` boolean`                                                                                      | ` onKeyLongPress(int arg0, `[KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html)` arg1) `                                                                                                                                                                                                              | | ` boolean`                                                                                      | ` onKeyMultiple(int arg0, int arg1, `[KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html)` arg2) `                                                                                                                                                                                                     | | ` boolean`                                                                                      | ` onKeyShortcut(int arg0, `[KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html)` arg1) `                                                                                                                                                                                                               | | ` boolean`                                                                                      | ` onKeyUp(int arg0, `[KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html)` arg1) `                                                                                                                                                                                                                     | | ` boolean`                                                                                      | ` onMenuItemSelected(int arg0, `[MenuItem](https://developer.android.com/reference/android/view/MenuItem.html)` arg1) `                                                                                                                                                                                                          | | ` boolean`                                                                                      | ` onMenuOpened(int arg0, `[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg1) `                                                                                                                                                                                                                        | | ` boolean`                                                                                      | ` onOptionsItemSelected(`[MenuItem](https://developer.android.com/reference/android/view/MenuItem.html)` arg0) `                                                                                                                                                                                                                 | | ` void`                                                                                         | ` onOptionsMenuClosed(`[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg0) `                                                                                                                                                                                                                           | | ` void`                                                                                         | ` onPanelClosed(int arg0, `[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg1) `                                                                                                                                                                                                                       | | ` boolean`                                                                                      | ` onPrepareOptionsMenu(`[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg0) `                                                                                                                                                                                                                          | | ` boolean`                                                                                      | ` onPreparePanel(int arg0, `[View](https://developer.android.com/reference/android/view/View.html)` arg1, `[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg2) `                                                                                                                                       | | ` void`                                                                                         | ` onRestoreInstanceState(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                      | | ` `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)                     | ` onSaveInstanceState() `                                                                                                                                                                                                                                                                                                        | | ` boolean`                                                                                      | ` onSearchRequested(`[SearchEvent](https://developer.android.com/reference/android/view/SearchEvent.html)` arg0) `                                                                                                                                                                                                               | | ` boolean`                                                                                      | ` onSearchRequested() `                                                                                                                                                                                                                                                                                                          | | ` void`                                                                                         | ` onStart() `                                                                                                                                                                                                                                                                                                                    | | ` void`                                                                                         | ` onStop() `                                                                                                                                                                                                                                                                                                                     | | ` boolean`                                                                                      | ` onTouchEvent(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` arg0) `                                                                                                                                                                                                                    | | ` boolean`                                                                                      | ` onTrackballEvent(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` arg0) `                                                                                                                                                                                                                | | ` void`                                                                                         | ` onWindowAttributesChanged(`[WindowManager.LayoutParams](https://developer.android.com/reference/android/view/WindowManager.LayoutParams.html)` arg0) `                                                                                                                                                                         | | ` void`                                                                                         | ` onWindowFocusChanged(boolean arg0) `                                                                                                                                                                                                                                                                                           | | ` `[ActionMode](https://developer.android.com/reference/android/view/ActionMode.html)           | ` onWindowStartingActionMode(`[ActionMode.Callback](https://developer.android.com/reference/android/view/ActionMode.Callback.html)` arg0) `                                                                                                                                                                                      | | ` `[ActionMode](https://developer.android.com/reference/android/view/ActionMode.html)           | ` onWindowStartingActionMode(`[ActionMode.Callback](https://developer.android.com/reference/android/view/ActionMode.Callback.html)` arg0, int arg1) `                                                                                                                                                                            | | ` void`                                                                                         | ` openContextMenu(`[View](https://developer.android.com/reference/android/view/View.html)` arg0) `                                                                                                                                                                                                                               | | ` void`                                                                                         | ` openOptionsMenu() `                                                                                                                                                                                                                                                                                                            | | ` void`                                                                                         | ` registerForContextMenu(`[View](https://developer.android.com/reference/android/view/View.html)` arg0) `                                                                                                                                                                                                                        | | ` final boolean`                                                                                | ` requestWindowFeature(int arg0) `                                                                                                                                                                                                                                                                                               | | ` final <T extends `[View](https://developer.android.com/reference/android/view/View.html)`> T` | ` requireViewById(int arg0) `                                                                                                                                                                                                                                                                                                    | | ` void`                                                                                         | ` setCancelMessage(`[Message](https://developer.android.com/reference/android/os/Message.html)` arg0) `                                                                                                                                                                                                                          | | ` void`                                                                                         | ` setCancelable(boolean arg0) `                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                         | ` setCanceledOnTouchOutside(boolean arg0) `                                                                                                                                                                                                                                                                                      | | ` void`                                                                                         | ` setContentView(int arg0) `                                                                                                                                                                                                                                                                                                     | | ` void`                                                                                         | ` setContentView(`[View](https://developer.android.com/reference/android/view/View.html)` arg0, `[ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html)` arg1) `                                                                                                             | | ` void`                                                                                         | ` setContentView(`[View](https://developer.android.com/reference/android/view/View.html)` arg0) `                                                                                                                                                                                                                                | | ` void`                                                                                         | ` setDismissMessage(`[Message](https://developer.android.com/reference/android/os/Message.html)` arg0) `                                                                                                                                                                                                                         | | ` final void`                                                                                   | ` setFeatureDrawable(int arg0, `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` arg1) `                                                                                                                                                                                             | | ` final void`                                                                                   | ` setFeatureDrawableAlpha(int arg0, int arg1) `                                                                                                                                                                                                                                                                                  | | ` final void`                                                                                   | ` setFeatureDrawableResource(int arg0, int arg1) `                                                                                                                                                                                                                                                                               | | ` final void`                                                                                   | ` setFeatureDrawableUri(int arg0, `[Uri](https://developer.android.com/reference/android/net/Uri.html)` arg1) `                                                                                                                                                                                                                  | | ` void`                                                                                         | ` setOnCancelListener(`[DialogInterface.OnCancelListener](https://developer.android.com/reference/android/content/DialogInterface.OnCancelListener.html)` arg0) `                                                                                                                                                                | | ` void`                                                                                         | ` setOnDismissListener(`[DialogInterface.OnDismissListener](https://developer.android.com/reference/android/content/DialogInterface.OnDismissListener.html)` arg0) `                                                                                                                                                             | | ` void`                                                                                         | ` setOnKeyListener(`[DialogInterface.OnKeyListener](https://developer.android.com/reference/android/content/DialogInterface.OnKeyListener.html)` arg0) `                                                                                                                                                                         | | ` void`                                                                                         | ` setOnShowListener(`[DialogInterface.OnShowListener](https://developer.android.com/reference/android/content/DialogInterface.OnShowListener.html)` arg0) `                                                                                                                                                                      | | ` final void`                                                                                   | ` setOwnerActivity(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0) `                                                                                                                                                                                                                       | | ` void`                                                                                         | ` setTitle(CharSequence arg0) `                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                         | ` setTitle(int arg0) `                                                                                                                                                                                                                                                                                                           | | ` final void`                                                                                   | ` setVolumeControlStream(int arg0) `                                                                                                                                                                                                                                                                                             | | ` void`                                                                                         | ` show() `                                                                                                                                                                                                                                                                                                                       | | ` void`                                                                                         | ` takeKeyEvents(boolean arg0) `                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                         | ` unregisterForContextMenu(`[View](https://developer.android.com/reference/android/view/View.html)` arg0) `                                                                                                                                                                                                                      | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#)From interface` `[android.content.DialogInterface](https://developer.android.com/reference/android/content/DialogInterface.html)` ` |------------------|---------------| | ` abstract void` | ` cancel() `  | | ` abstract void` | ` dismiss() ` | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#)From interface` `[android.view.Window.Callback](https://developer.android.com/reference/android/view/Window.Callback.html)` ` |------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract boolean`                                                                            | ` dispatchGenericMotionEvent(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` arg0) `                                                                                                                    | | ` abstract boolean`                                                                            | ` dispatchKeyEvent(`[KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html)` arg0) `                                                                                                                                    | | ` abstract boolean`                                                                            | ` dispatchKeyShortcutEvent(`[KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html)` arg0) `                                                                                                                            | | ` abstract boolean`                                                                            | ` dispatchPopulateAccessibilityEvent(`[AccessibilityEvent](https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html)` arg0) `                                                                                | | ` abstract boolean`                                                                            | ` dispatchTouchEvent(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` arg0) `                                                                                                                            | | ` abstract boolean`                                                                            | ` dispatchTrackballEvent(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` arg0) `                                                                                                                        | | ` abstract void`                                                                               | ` onActionModeFinished(`[ActionMode](https://developer.android.com/reference/android/view/ActionMode.html)` arg0) `                                                                                                                            | | ` abstract void`                                                                               | ` onActionModeStarted(`[ActionMode](https://developer.android.com/reference/android/view/ActionMode.html)` arg0) `                                                                                                                             | | ` abstract void`                                                                               | ` onAttachedToWindow() `                                                                                                                                                                                                                       | | ` abstract void`                                                                               | ` onContentChanged() `                                                                                                                                                                                                                         | | ` abstract boolean`                                                                            | ` onCreatePanelMenu(int arg0, `[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg1) `                                                                                                                                 | | ` abstract `[View](https://developer.android.com/reference/android/view/View.html)             | ` onCreatePanelView(int arg0) `                                                                                                                                                                                                                | | ` abstract void`                                                                               | ` onDetachedFromWindow() `                                                                                                                                                                                                                     | | ` abstract boolean`                                                                            | ` onMenuItemSelected(int arg0, `[MenuItem](https://developer.android.com/reference/android/view/MenuItem.html)` arg1) `                                                                                                                        | | ` abstract boolean`                                                                            | ` onMenuOpened(int arg0, `[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg1) `                                                                                                                                      | | ` abstract void`                                                                               | ` onPanelClosed(int arg0, `[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg1) `                                                                                                                                     | | ` default void`                                                                                | ` onPointerCaptureChanged(boolean arg0) `                                                                                                                                                                                                      | | ` abstract boolean`                                                                            | ` onPreparePanel(int arg0, `[View](https://developer.android.com/reference/android/view/View.html)` arg1, `[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg2) `                                                     | | ` default void`                                                                                | ` onProvideKeyboardShortcuts(List<`[KeyboardShortcutGroup](https://developer.android.com/reference/android/view/KeyboardShortcutGroup.html)`> arg0, `[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg1, int arg2) ` | | ` abstract boolean`                                                                            | ` onSearchRequested() `                                                                                                                                                                                                                        | | ` abstract boolean`                                                                            | ` onSearchRequested(`[SearchEvent](https://developer.android.com/reference/android/view/SearchEvent.html)` arg0) `                                                                                                                             | | ` abstract void`                                                                               | ` onWindowAttributesChanged(`[WindowManager.LayoutParams](https://developer.android.com/reference/android/view/WindowManager.LayoutParams.html)` arg0) `                                                                                       | | ` abstract void`                                                                               | ` onWindowFocusChanged(boolean arg0) `                                                                                                                                                                                                         | | ` abstract `[ActionMode](https://developer.android.com/reference/android/view/ActionMode.html) | ` onWindowStartingActionMode(`[ActionMode.Callback](https://developer.android.com/reference/android/view/ActionMode.Callback.html)` arg0) `                                                                                                    | | ` abstract `[ActionMode](https://developer.android.com/reference/android/view/ActionMode.html) | ` onWindowStartingActionMode(`[ActionMode.Callback](https://developer.android.com/reference/android/view/ActionMode.Callback.html)` arg0, int arg1) `                                                                                          | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#)From interface` `[android.view.KeyEvent.Callback](https://developer.android.com/reference/android/view/KeyEvent.Callback.html)` ` |---------------------|------------------------------------------------------------------------------------------------------------------------------| | ` abstract boolean` | ` onKeyDown(int arg0, `[KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html)` arg1) `               | | ` abstract boolean` | ` onKeyLongPress(int arg0, `[KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html)` arg1) `          | | ` abstract boolean` | ` onKeyMultiple(int arg0, int arg1, `[KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html)` arg2) ` | | ` abstract boolean` | ` onKeyUp(int arg0, `[KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html)` arg1) `                 | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#)From interface` `[android.view.View.OnCreateContextMenuListener](https://developer.android.com/reference/android/view/View.OnCreateContextMenuListener.html)` ` |------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract void` | ` onCreateContextMenu(`[ContextMenu](https://developer.android.com/reference/android/view/ContextMenu.html)` arg0, `[View](https://developer.android.com/reference/android/view/View.html)` arg1, `[ContextMenu.ContextMenuInfo](https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.html)` arg2) ` | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog#)From interface` `[android.support.v7.app.AppCompatCallback](https://developer.android.com/reference/android/support/v7/app/AppCompatCallback)` ` |------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract void`                                                                                     | ` `[onSupportActionModeFinished](https://developer.android.com/reference/android/support/v7/app/AppCompatCallback#onSupportActionModeFinished(android.support.v7.view.ActionMode))`(`[ActionMode](https://developer.android.com/reference/android/support/v7/view/ActionMode)` mode) ` Called when a support action mode has finished.                                                                | | ` abstract void`                                                                                     | ` `[onSupportActionModeStarted](https://developer.android.com/reference/android/support/v7/app/AppCompatCallback#onSupportActionModeStarted(android.support.v7.view.ActionMode))`(`[ActionMode](https://developer.android.com/reference/android/support/v7/view/ActionMode)` mode) ` Called when a support action mode has been started.                                                              | | ` abstract `[ActionMode](https://developer.android.com/reference/android/support/v7/view/ActionMode) | ` `[onWindowStartingSupportActionMode](https://developer.android.com/reference/android/support/v7/app/AppCompatCallback#onWindowStartingSupportActionMode(android.support.v7.view.ActionMode.Callback))`(`[ActionMode.Callback](https://developer.android.com/reference/android/support/v7/view/ActionMode.Callback)` callback) ` Called when a support action mode is being started for this window. | ||

## Public constructors

### AppCompatDialog

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
AppCompatDialog (Context context)
```

<br />

<br />

|         Parameters          ||
|-----------|------------------|
| `context` | `Context` <br /> |

### AppCompatDialog

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
AppCompatDialog (Context context, 
                int theme)
```

<br />

<br />

|         Parameters          ||
|-----------|------------------|
| `context` | `Context` <br /> |
| `theme`   | `int` <br />     |

## Protected constructors

### AppCompatDialog

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
AppCompatDialog (Context context, 
                boolean cancelable, 
                DialogInterface.OnCancelListener cancelListener)
```

<br />

<br />

|                         Parameters                          ||
|------------------|-------------------------------------------|
| `context`        | `Context` <br />                          |
| `cancelable`     | `boolean` <br />                          |
| `cancelListener` | `DialogInterface.OnCancelListener` <br /> |

## Public methods

### addContentView

```
void addContentView (View view, 
                ViewGroup.LayoutParams params)
```

<br />

<br />

|                Parameters                 ||
|----------|---------------------------------|
| `view`   | `View` <br />                   |
| `params` | `ViewGroup.LayoutParams` <br /> |

### findViewById

```
T findViewById (int id)
```

<br />

<br />

|     Parameters     ||
|------|--------------|
| `id` | `int` <br /> |

|   Returns   ||
|-----|--------|
| `T` | <br /> |

### getDelegate

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
AppCompatDelegate getDelegate ()
```

<br />

<br />

|                                                                                                                     Returns                                                                                                                      ||
|-------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|
| [AppCompatDelegate](https://developer.android.com/reference/android/support/v7/app/AppCompatDelegate) | The[AppCompatDelegate](https://developer.android.com/reference/android/support/v7/app/AppCompatDelegate)being used by this Dialog. <br /> |

### getSupportActionBar

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ActionBar getSupportActionBar ()
```

Support library version of[getActionBar()](https://developer.android.com/reference/android/app/Dialog.html#getActionBar()).

Retrieve a reference to this dialog's ActionBar.

<br />

|                                                                        Returns                                                                         ||
|---------------------------------------------------------------------------------------|-----------------------------------------------------------------|
| [ActionBar](https://developer.android.com/reference/android/support/v7/app/ActionBar) | The Dialog's ActionBar, or null if it does not have one. <br /> |

### onSupportActionModeFinished

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onSupportActionModeFinished (ActionMode mode)
```

Called when a support action mode has finished.

<br />

|                            Parameters                            ||
|--------|----------------------------------------------------------|
| `mode` | `ActionMode`: The action mode that just finished. <br /> |

### onSupportActionModeStarted

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onSupportActionModeStarted (ActionMode mode)
```

Called when a support action mode has been started.

<br />

|                    Parameters                     ||
|--------|-------------------------------------------|
| `mode` | `ActionMode`: The new action mode. <br /> |

### onWindowStartingSupportActionMode

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ActionMode onWindowStartingSupportActionMode (ActionMode.Callback callback)
```

Called when a support action mode is being started for this window. Gives the callback an opportunity to handle the action mode in its own unique and beautiful way. If this method returns null the system can choose a way to present the mode or choose not to start the mode at all.

<br />

|                                           Parameters                                            ||
|------------|-------------------------------------------------------------------------------------|
| `callback` | `ActionMode.Callback`: Callback to control the lifecycle of this action mode <br /> |

|                                                                                  Returns                                                                                  ||
|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|
| [ActionMode](https://developer.android.com/reference/android/support/v7/view/ActionMode) | The ActionMode that was started, or null if the system should present it <br /> |

### setContentView

```
void setContentView (View view)
```

<br />

<br />

|      Parameters       ||
|--------|---------------|
| `view` | `View` <br /> |

### setContentView

```
void setContentView (int layoutResID)
```

<br />

<br />

|         Parameters          ||
|---------------|--------------|
| `layoutResID` | `int` <br /> |

### setContentView

```
void setContentView (View view, 
                ViewGroup.LayoutParams params)
```

<br />

<br />

|                Parameters                 ||
|----------|---------------------------------|
| `view`   | `View` <br />                   |
| `params` | `ViewGroup.LayoutParams` <br /> |

### setTitle

```
void setTitle (CharSequence title)
```

<br />

<br />

|           Parameters           ||
|---------|-----------------------|
| `title` | `CharSequence` <br /> |

### setTitle

```
void setTitle (int titleId)
```

<br />

<br />

|       Parameters        ||
|-----------|--------------|
| `titleId` | `int` <br /> |

### supportRequestWindowFeature

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean supportRequestWindowFeature (int featureId)
```

Enable extended support library window features.

This is a convenience for calling[getWindow().requestFeature()](https://developer.android.com/reference/android/view/Window.html#requestFeature(int)).

<br />

<br />

|                                                                                                              Parameters                                                                                                               ||
|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `featureId` | `int`: The desired feature as defined in[Window](https://developer.android.com/reference/android/view/Window.html)or[WindowCompat](https://developer.android.com/reference/android/support/v4/view/WindowCompat). <br /> |

|                                        Returns                                        ||
|-----------|----------------------------------------------------------------------------|
| `boolean` | Returns true if the requested feature is supported and now enabled. <br /> |

**See also:**

- [requestWindowFeature(int)](https://developer.android.com/https://developer.android.com/reference/android/app/Dialog#requestWindowFeature(int))
- [requestFeature(int)](https://developer.android.com/https://developer.android.com/reference/android/view/Window#requestFeature(int))

## Protected methods

### onCreate

```
void onCreate (Bundle savedInstanceState)
```

<br />

<br />

|              Parameters               ||
|----------------------|-----------------|
| `savedInstanceState` | `Bundle` <br /> |

### onStop

```
void onStop ()
```

<br />

<br />

-

  ## Interfaces

  - [ActionBar.OnMenuVisibilityListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.OnMenuVisibilityListener)
  - [ActionBar.OnNavigationListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.OnNavigationListener)
  - [ActionBar.TabListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.TabListener)
  - [ActionBarDrawerToggle.Delegate](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle.Delegate)
  - [ActionBarDrawerToggle.DelegateProvider](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle.DelegateProvider)
  - [AppCompatCallback](https://developer.android.com/reference/android/support/v7/app/AppCompatCallback)
-

  ## Classes

  - [ActionBar](https://developer.android.com/reference/android/support/v7/app/ActionBar)
  - [ActionBar.LayoutParams](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams)
  - [ActionBar.Tab](https://developer.android.com/reference/android/support/v7/app/ActionBar.Tab)
  - [ActionBarDrawerToggle](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle)
  - [AlertDialog](https://developer.android.com/reference/android/support/v7/app/AlertDialog)
  - [AlertDialog.Builder](https://developer.android.com/reference/android/support/v7/app/AlertDialog.Builder)
  - [AppCompatActivity](https://developer.android.com/reference/android/support/v7/app/AppCompatActivity)
  - [AppCompatDelegate](https://developer.android.com/reference/android/support/v7/app/AppCompatDelegate)
  - [AppCompatDialog](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog)
  - [AppCompatDialogFragment](https://developer.android.com/reference/android/support/v7/app/AppCompatDialogFragment)
  - [AppCompatViewInflater](https://developer.android.com/reference/android/support/v7/app/AppCompatViewInflater)
  - [MediaRouteActionProvider](https://developer.android.com/reference/android/support/v7/app/MediaRouteActionProvider)
  - [MediaRouteButton](https://developer.android.com/reference/android/support/v7/app/MediaRouteButton)
  - [MediaRouteChooserDialog](https://developer.android.com/reference/android/support/v7/app/MediaRouteChooserDialog)
  - [MediaRouteChooserDialogFragment](https://developer.android.com/reference/android/support/v7/app/MediaRouteChooserDialogFragment)
  - [MediaRouteControllerDialog](https://developer.android.com/reference/android/support/v7/app/MediaRouteControllerDialog)
  - [MediaRouteControllerDialogFragment](https://developer.android.com/reference/android/support/v7/app/MediaRouteControllerDialogFragment)
  - [MediaRouteDialogFactory](https://developer.android.com/reference/android/support/v7/app/MediaRouteDialogFactory)
  - [MediaRouteDiscoveryFragment](https://developer.android.com/reference/android/support/v7/app/MediaRouteDiscoveryFragment)