Activity.RemoveDialog(Int32) Method

Definition

Caution

deprecated

This method was deprecated in API level 15.

[Android.Runtime.Register("removeDialog", "(I)V", "")]
[System.Obsolete("deprecated")]
public void RemoveDialog(int id);
[<Android.Runtime.Register("removeDialog", "(I)V", "")>]
[<System.Obsolete("deprecated")>]
member this.RemoveDialog : int -> unit

Parameters

id
Int32

int: The id of the managed dialog.

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.

Removes any internal references to a dialog managed by this Activity. If the dialog is showing, it will dismiss it as part of the clean up. This can be useful if you know that you will never show a dialog again and want to avoid the overhead of saving and restoring it in the future. As of Build.VERSION_CODES.GINGERBREAD, this function will not throw an exception if you try to remove an ID that does not currently have an associated dialog.

See also:

Android reference for android.app.Activity.removeDialog.

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