# DialogInterface.OnDismissListener

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Methods](https://developer.android.com/reference/android/content/DialogInterface.OnDismissListener#pubmethods)  

# DialogInterface.OnDismissListener

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/content/DialogInterface.OnDismissListener "View this page in Kotlin")\|Java

`
public
static


interface
DialogInterface.OnDismissListener
`  
`


`

|---------------------------------------------------|
| android.content.DialogInterface.OnDismissListener |

|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known indirect subclasses [DialogFragment](https://developer.android.com/reference/android/app/DialogFragment),[DialogPreference](https://developer.android.com/reference/android/preference/DialogPreference),[EditTextPreference](https://developer.android.com/reference/android/preference/EditTextPreference),[ListPreference](https://developer.android.com/reference/android/preference/ListPreference),[MultiSelectListPreference](https://developer.android.com/reference/android/preference/MultiSelectListPreference),[PreferenceScreen](https://developer.android.com/reference/android/preference/PreferenceScreen),[SearchManager](https://developer.android.com/reference/android/app/SearchManager) |-------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [DialogFragment](https://developer.android.com/reference/android/app/DialogFragment)                              | *This class was deprecated in API level 28. Use the[Support Library](https://developer.android.com/tools/extras/support-library)[DialogFragment](https://developer.android.com/reference/androidx/fragment/app/DialogFragment.html)for consistent behavior across all devices and access to[Lifecycle](https://developer.android.com/topic/libraries/architecture/lifecycle).*                  | | [DialogPreference](https://developer.android.com/reference/android/preference/DialogPreference)                   | *This class was deprecated in API level 29. Use the[AndroidX](https://developer.android.com/jetpack/androidx)[Preference Library](https://developer.android.com/reference/androidx/preference/package-summary)for consistent behavior across all devices. For more information on using the AndroidX Preference Library see[Settings](https://developer.android.com/guide/topics/ui/settings).* | | [EditTextPreference](https://developer.android.com/reference/android/preference/EditTextPreference)               | *This class was deprecated in API level 29. Use the[AndroidX](https://developer.android.com/jetpack/androidx)[Preference Library](https://developer.android.com/reference/androidx/preference/package-summary)for consistent behavior across all devices. For more information on using the AndroidX Preference Library see[Settings](https://developer.android.com/guide/topics/ui/settings).* | | [ListPreference](https://developer.android.com/reference/android/preference/ListPreference)                       | *This class was deprecated in API level 29. Use the[AndroidX](https://developer.android.com/jetpack/androidx)[Preference Library](https://developer.android.com/reference/androidx/preference/package-summary)for consistent behavior across all devices. For more information on using the AndroidX Preference Library see[Settings](https://developer.android.com/guide/topics/ui/settings).* | | [MultiSelectListPreference](https://developer.android.com/reference/android/preference/MultiSelectListPreference) | *This class was deprecated in API level 29. Use the[AndroidX](https://developer.android.com/jetpack/androidx)[Preference Library](https://developer.android.com/reference/androidx/preference/package-summary)for consistent behavior across all devices. For more information on using the AndroidX Preference Library see[Settings](https://developer.android.com/guide/topics/ui/settings).* | | [PreferenceScreen](https://developer.android.com/reference/android/preference/PreferenceScreen)                   | *This class was deprecated in API level 29. Use the[AndroidX](https://developer.android.com/jetpack/androidx)[Preference Library](https://developer.android.com/reference/androidx/preference/package-summary)for consistent behavior across all devices. For more information on using the AndroidX Preference Library see[Settings](https://developer.android.com/guide/topics/ui/settings).* | | [SearchManager](https://developer.android.com/reference/android/app/SearchManager)                                | This class provides access to the system search services.                                                                                                                                                                                                                                                                                                                                       | |

<br />

*** ** * ** ***

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

## Summary

|                                                                                                                                                            ### Public methods                                                                                                                                                            ||
|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[onDismiss](https://developer.android.com/reference/android/content/DialogInterface.OnDismissListener#onDismiss(android.content.DialogInterface))`(`[DialogInterface](https://developer.android.com/reference/android/content/DialogInterface)` dialog) ` This method will be invoked when the dialog is dismissed. |

## Public methods

### onDismiss

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

```
public abstract void onDismiss (DialogInterface dialog)
```

This method will be invoked when the dialog is dismissed.

<br />

|                                            Parameters                                            ||
|----------|----------------------------------------------------------------------------------------|
| `dialog` | `DialogInterface`: the dialog that was dismissed will be passed into the method <br /> |