# DialogInterface.OnShowListener

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

# DialogInterface.OnShowListener

*** ** * ** ***

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

`
public
static


interface
DialogInterface.OnShowListener
`  
`


`

|------------------------------------------------|
| android.content.DialogInterface.OnShowListener |

<br />

*** ** * ** ***

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

## Summary

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

## Public methods

### onShow

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

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

This method will be invoked when the dialog is shown.

<br />

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