Udostępnij za pośrednictwem


Activity.OnPrepareDialog Method

Definition

Overloads

OnPrepareDialog(Int32, Dialog)
Obsolete.

This member is deprecated.

OnPrepareDialog(Int32, Dialog, Bundle)
Obsolete.

Provides an opportunity to prepare a managed dialog before it is being shown.

OnPrepareDialog(Int32, Dialog)

Caution

deprecated

This member is deprecated.

[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
dialog
Dialog
Attributes

Remarks

This member is deprecated. Old no-arguments version of #onPrepareDialog(int, Dialog, Bundle).

Java documentation for android.app.Activity.onPrepareDialog(int, android.app.Dialog).

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, Bundle)

Caution

deprecated

Provides an opportunity to prepare a managed dialog before it is being shown.

[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

The id of the managed dialog.

dialog
Dialog

The dialog.

args
Bundle

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

Attributes

Remarks

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.

This member is deprecated. Use the new DialogFragment class with FragmentManager instead; this is also available on older platforms through the Android compatibility package.

Java documentation for android.app.Activity.onPrepareDialog(int, android.app.Dialog, android.os.Bundle).

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.

See also

Applies to