Stay organized with collections
Save and categorize content based on your preferences.
DialogInterface.OnDismissListener
public
static
interface
DialogInterface.OnDismissListener
android.content.DialogInterface.OnDismissListener
|
Known indirect subclasses
|
Interface used to allow the creator of a dialog to run some code when the
dialog is dismissed.
Summary
Public methods |
abstract
void
|
onDismiss(DialogInterface dialog)
This method will be invoked when the dialog is dismissed.
|
Public methods
onDismiss
public abstract void onDismiss (DialogInterface dialog)
This method will be invoked when the dialog is dismissed.
Parameters |
dialog |
DialogInterface : the dialog that was dismissed will be passed into the
method |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# DialogInterface.OnDismissListener\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Methods](#pubmethods) \n\nDialogInterface.OnDismissListener\n=================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/content/DialogInterface.OnDismissListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nDialogInterface.OnDismissListener\n`\n\n\n`\n\n\n`\n\n|---------------------------------------------------|\n| android.content.DialogInterface.OnDismissListener |\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known indirect subclasses [DialogFragment](/reference/android/app/DialogFragment), [DialogPreference](/reference/android/preference/DialogPreference), [EditTextPreference](/reference/android/preference/EditTextPreference), [ListPreference](/reference/android/preference/ListPreference), [MultiSelectListPreference](/reference/android/preference/MultiSelectListPreference), [PreferenceScreen](/reference/android/preference/PreferenceScreen), [SearchManager](/reference/android/app/SearchManager) |--------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [DialogFragment](/reference/android/app/DialogFragment) | *This class was deprecated in API level 28. Use the [Support Library](/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](/topic/libraries/architecture/lifecycle).* | | [DialogPreference](/reference/android/preference/DialogPreference) | *This class was deprecated in API level 29. Use the [AndroidX](/jetpack/androidx) [Preference Library](/reference/androidx/preference/package-summary) for consistent behavior across all devices. For more information on using the AndroidX Preference Library see [Settings](/guide/topics/ui/settings).* | | [EditTextPreference](/reference/android/preference/EditTextPreference) | *This class was deprecated in API level 29. Use the [AndroidX](/jetpack/androidx) [Preference Library](/reference/androidx/preference/package-summary) for consistent behavior across all devices. For more information on using the AndroidX Preference Library see [Settings](/guide/topics/ui/settings).* | | [ListPreference](/reference/android/preference/ListPreference) | *This class was deprecated in API level 29. Use the [AndroidX](/jetpack/androidx) [Preference Library](/reference/androidx/preference/package-summary) for consistent behavior across all devices. For more information on using the AndroidX Preference Library see [Settings](/guide/topics/ui/settings).* | | [MultiSelectListPreference](/reference/android/preference/MultiSelectListPreference) | *This class was deprecated in API level 29. Use the [AndroidX](/jetpack/androidx) [Preference Library](/reference/androidx/preference/package-summary) for consistent behavior across all devices. For more information on using the AndroidX Preference Library see [Settings](/guide/topics/ui/settings).* | | [PreferenceScreen](/reference/android/preference/PreferenceScreen) | *This class was deprecated in API level 29. Use the [AndroidX](/jetpack/androidx) [Preference Library](/reference/androidx/preference/package-summary) for consistent behavior across all devices. For more information on using the AndroidX Preference Library see [Settings](/guide/topics/ui/settings).* | | [SearchManager](/reference/android/app/SearchManager) | This class provides access to the system search services. | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface used to allow the creator of a dialog to run some code when the\ndialog is dismissed.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onDismiss](/reference/android/content/DialogInterface.OnDismissListener#onDismiss(android.content.DialogInterface))`(`[DialogInterface](/reference/android/content/DialogInterface)` dialog) ` This method will be invoked when the dialog is dismissed. |\n\nPublic methods\n--------------\n\n### onDismiss\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onDismiss (DialogInterface dialog)\n```\n\nThis method will be invoked when the dialog is dismissed.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|----------------------------------------------------------------------------------------|\n| `dialog` | `DialogInterface`: the dialog that was dismissed will be passed into the method \u003cbr /\u003e |"]]