Stay organized with collections
Save and categorize content based on your preferences.
OnDismissListener
interface 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 Unit |
This method will be invoked when the dialog is dismissed.
|
Public methods
onDismiss
abstract fun onDismiss(dialog: DialogInterface!): Unit
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](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnDismissListener\n=================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/content/DialogInterface.OnDismissListener \"View this page in Java\") \n\n```\ninterface OnDismissListener\n```\n\n|--------------------------------------------------------|\n| [android.content.DialogInterface.OnDismissListener](#) |\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [DialogFragment](../app/DialogFragment.html#), [DialogPreference](../preference/DialogPreference.html#), [PreferenceScreen](../preference/PreferenceScreen.html#), [SearchManager](../app/SearchManager.html#) |----------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------| | [DialogFragment](../app/DialogFragment.html#) | A fragment that displays a dialog window, floating on top of its activity's window. | | [DialogPreference](../preference/DialogPreference.html#) | A base class for [Preference](../preference/Preference.html#) objects that are dialog-based. | | [PreferenceScreen](../preference/PreferenceScreen.html#) | Represents a top-level [Preference](../preference/Preference.html#) that is the root of a Preference hierarchy. | | [SearchManager](../app/SearchManager.html#) | This class provides access to the system search services. | |\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Indirect Subclasses [EditTextPreference](../preference/EditTextPreference.html#), [ListPreference](../preference/ListPreference.html#), [MultiSelectListPreference](../preference/MultiSelectListPreference.html#) |----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------| | [EditTextPreference](../preference/EditTextPreference.html#) | A [Preference](../preference/Preference.html#) that allows for string input. | | [ListPreference](../preference/ListPreference.html#) | A [Preference](../preference/Preference.html#) that displays a list of entries as a dialog. | | [MultiSelectListPreference](../preference/MultiSelectListPreference.html#) | A [Preference](../preference/Preference.html#) that displays a list of entries as a dialog. | |\n\nInterface used to allow the creator of a dialog to run some code when the dialog is dismissed.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onDismiss](#onDismiss(android.content.DialogInterface))`(`dialog:` `[DialogInterface](/reference/kotlin/android/content/DialogInterface)!`)` This method will be invoked when the dialog is dismissed. |\n\nPublic methods\n--------------\n\n### onDismiss\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onDismiss(dialog: DialogInterface!): Unit\n```\n\nThis method will be invoked when the dialog is dismissed.\n\n| Parameters ||\n|----------|-------------------------------------------------------------------------------------------------------------------------------------|\n| `dialog` | [DialogInterface](/reference/kotlin/android/content/DialogInterface)!: the dialog that was dismissed will be passed into the method |"]]