Android.App.Activity.RemoveDialog Method
Removes any internal references to a dialog managed by this Activity.

Syntax

[Android.Runtime.Register("removeDialog", "(I)V", "")]
[System.Obsolete("deprecated")]
public void RemoveDialog (int id)

See Also

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

Parameters

id
The id of the managed dialog.

Remarks

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 NoType:android/os/Build$VERSION_CODES;Href=../../../reference/android/os/Build.VERSION_CODES.html#GINGERBREAD, this function will not throw an exception if you try to remove an ID that does not currently have an associated 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 1