Android.App.Activity.OnCreateDialog Method
Callback for creating dialogs that are managed (saved and restored) for you by the activity.

Syntax

[Android.Runtime.Register("onCreateDialog", "(ILandroid/os/Bundle;)Landroid/app/Dialog;", "GetOnCreateDialog_ILandroid_os_Bundle_Handler")]
[System.Obsolete("deprecated")]
protected virtual Dialog OnCreateDialog (int id, Android.OS.Bundle args)

See Also

Activity.OnPrepareDialog(int, Android.App.Dialog, Android.App.Dialog)
Activity.ShowDialog(int, Android.OS.Bundle)
Activity.DismissDialog(int)
Activity.RemoveDialog(int)

Parameters

id
The id of the dialog.
args
The dialog arguments provided to Activity.ShowDialog(int, Android.OS.Bundle).

Returns

Documentation for this section has not yet been entered.

Remarks

Callback for creating dialogs that are managed (saved and restored) for you by the activity. The default implementation calls through to Activity.OnCreateDialog(int) for compatibility. If you are targeting NoType:android/os/Build$VERSION_CODES;Href=../../../reference/android/os/Build.VERSION_CODES.html#HONEYCOMB or later, consider instead using a Android.App.DialogFragment instead.

If you use Activity.ShowDialog(int), the activity will call through to this method the first time, and hang onto it thereafter. Any dialog that is created by this method will automatically be saved and restored for you, including whether it is showing.

If you would like the activity to manage saving and restoring dialogs for you, you should override this method and handle any ids that are passed to Activity.ShowDialog(int).

If you would like an opportunity to prepare your dialog before it is shown, override Activity.OnPrepareDialog(int, Android.App.Dialog, Android.App.Dialog).

[Android Documentation]

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 8