Android Guides | Samples

Android.App.FragmentManager.PutFragment Method

Put a reference to a fragment in a Bundle.

Syntax

[Android.Runtime.Register("putFragment", "(Landroid/os/Bundle;Ljava/lang/String;Landroid/app/Fragment;)V", "GetPutFragment_Landroid_os_Bundle_Ljava_lang_String_Landroid_app_Fragment_Handler")]
public abstract Void PutFragment (Bundle bundle, String key, Fragment fragment)

Parameters

bundle
The bundle in which to put the fragment reference.
key
The name of the entry in the bundle.
fragment
The Fragment whose reference is to be stored.

Remarks

Put a reference to a fragment in a Bundle. This Bundle can be persisted as saved state, and when later restoring FragmentManager.GetFragment(Bundle,String) will return the current instance of the same fragment.

[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