DialogFragment.Show Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| Show(FragmentManager, String) |
Display the dialog, adding the fragment to the given FragmentManager. |
| Show(FragmentTransaction, String) |
Display the dialog, adding the fragment using an existing transaction and then committing the transaction. |
Show(FragmentManager, String)
Display the dialog, adding the fragment to the given FragmentManager.
[Android.Runtime.Register("show", "(Landroid/app/FragmentManager;Ljava/lang/String;)V", "GetShow_Landroid_app_FragmentManager_Ljava_lang_String_Handler")]
public virtual void Show(Android.App.FragmentManager? manager, string? tag);
[<Android.Runtime.Register("show", "(Landroid/app/FragmentManager;Ljava/lang/String;)V", "GetShow_Landroid_app_FragmentManager_Ljava_lang_String_Handler")>]
abstract member Show : Android.App.FragmentManager * string -> unit
override this.Show : Android.App.FragmentManager * string -> unit
Parameters
- manager
- FragmentManager
FragmentManager: The FragmentManager this fragment will be added to.
- tag
- String
String: The tag for this fragment, as per FragmentTransaction.add.
- Attributes
Remarks
Display the dialog, adding the fragment to the given FragmentManager. This is a convenience for explicitly creating a transaction, adding the fragment to it with the given tag, and committing it. This does not add the transaction to the back stack. When the fragment is dismissed, a new transaction will be executed to remove it from the activity.
Android reference for android.app.DialogFragment.show.
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
Show(FragmentTransaction, String)
Display the dialog, adding the fragment using an existing transaction and then committing the transaction.
[Android.Runtime.Register("show", "(Landroid/app/FragmentTransaction;Ljava/lang/String;)I", "GetShow_Landroid_app_FragmentTransaction_Ljava_lang_String_Handler")]
public virtual int Show(Android.App.FragmentTransaction? transaction, string? tag);
[<Android.Runtime.Register("show", "(Landroid/app/FragmentTransaction;Ljava/lang/String;)I", "GetShow_Landroid_app_FragmentTransaction_Ljava_lang_String_Handler")>]
abstract member Show : Android.App.FragmentTransaction * string -> int
override this.Show : Android.App.FragmentTransaction * string -> int
Parameters
- transaction
- FragmentTransaction
FragmentTransaction: An existing transaction in which to add the fragment.
- tag
- String
String: The tag for this fragment, as per FragmentTransaction.add.
Returns
- Attributes
Remarks
Display the dialog, adding the fragment using an existing transaction and then committing the transaction.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-08-03 UTC.
Android reference for android.app.DialogFragment.show.
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.