Android.App.FragmentTransaction.Replace Method
Replace an existing fragment that was added to a container.

Syntax

[Android.Runtime.Register("replace", "(ILandroid/app/Fragment;Ljava/lang/String;)Landroid/app/FragmentTransaction;", "GetReplace_ILandroid_app_Fragment_Ljava_lang_String_Handler")]
public abstract FragmentTransaction Replace (int containerViewId, Fragment fragment, string tag)

Parameters

containerViewId
Identifier of the container whose fragment(s) are to be replaced.
fragment
The new fragment to place in the container.
tag
Optional tag name for the fragment, to later retrieve the fragment with FragmentManager.FindFragmentByTag(string).

Returns

Documentation for this section has not yet been entered.

Remarks

Replace an existing fragment that was added to a container. This is essentially the same as calling FragmentTransaction.Remove(Fragment) for all currently added fragments that were added with the same containerViewId and then FragmentTransaction.Add(int, Android.App.Fragment, Android.App.Fragment) with the same arguments given here.

[Android Documentation]

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 11