Activity.OnPrepareDialog Method

Definition

Overloads

Name Description
OnPrepareDialog(Int32, Dialog, Bundle)
Obsolete.

This method was deprecated in API level 15.

OnPrepareDialog(Int32, Dialog)
Obsolete.

This method was deprecated in API level 15.

OnPrepareDialog(Int32, Dialog, Bundle)

Caution

deprecated

This method was deprecated in API level 15.

[Android.Runtime.Register("onPrepareDialog", "(ILandroid/app/Dialog;Landroid/os/Bundle;)V", "GetOnPrepareDialog_ILandroid_app_Dialog_Landroid_os_Bundle_Handler")]
[System.Obsolete("deprecated")]
protected virtual void OnPrepareDialog(int id, Android.App.Dialog? dialog, Android.OS.Bundle? args);
[<Android.Runtime.Register("onPrepareDialog", "(ILandroid/app/Dialog;Landroid/os/Bundle;)V", "GetOnPrepareDialog_ILandroid_app_Dialog_Landroid_os_Bundle_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member OnPrepareDialog : int * Android.App.Dialog * Android.OS.Bundle -> unit
override this.OnPrepareDialog : int * Android.App.Dialog * Android.OS.Bundle -> unit

Parameters

id
Int32

int: The id of the managed dialog.

dialog
Dialog

Dialog: The dialog.

args
Bundle

Bundle: The dialog arguments provided to showDialog(int,Bundle).

Attributes

Remarks

This method was deprecated in API level 15. Use the new DialogFragment class with FragmentManager instead; this is also available on older platforms through the Android compatibility package.

Provides an opportunity to prepare a managed dialog before it is being shown. The default implementation calls through to onPrepareDialog(int,Dialog) for compatibility. Override this if you need to update a managed dialog based on the state of the application each time it is shown. For example, a time picker dialog might want to be updated with the current time. You should call through to the superclass's implementation. The default implementation will set this Activity as the owner activity on the Dialog.

See also:

Android reference for android.app.Activity.onPrepareDialog.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

OnPrepareDialog(Int32, Dialog)

Caution

deprecated

This method was deprecated in API level 15.

[Android.Runtime.Register("onPrepareDialog", "(ILandroid/app/Dialog;)V", "GetOnPrepareDialog_ILandroid_app_Dialog_Handler")]
[System.Obsolete("deprecated")]
protected virtual void OnPrepareDialog(int id, Android.App.Dialog? dialog);
[<Android.Runtime.Register("onPrepareDialog", "(ILandroid/app/Dialog;)V", "GetOnPrepareDialog_ILandroid_app_Dialog_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member OnPrepareDialog : int * Android.App.Dialog -> unit
override this.OnPrepareDialog : int * Android.App.Dialog -> unit

Parameters

id
Int32

int

dialog
Dialog

Dialog

Attributes

Remarks

This method was deprecated in API level 15. Old no-arguments version of onPrepareDialog(int,Dialog,Bundle).

Android reference for android.app.Activity.onPrepareDialog.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to