FragmentManager.PutFragment(Bundle, String, Fragment) 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.
Put a reference to a fragment in a Bundle.
[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 (Android.OS.Bundle? bundle, string? key, Android.App.Fragment? fragment);
[<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")>]
abstract member PutFragment : Android.OS.Bundle * string * Android.App.Fragment -> unit
Parameters
- bundle
- Bundle
The bundle in which to put the fragment reference.
- key
- String
The name of the entry in the bundle.
- fragment
- Fragment
The Fragment whose reference is to be stored.
- Attributes
Remarks
Put a reference to a fragment in a Bundle. This Bundle can be persisted as saved state, and when later restoring #getFragment(Bundle, String)
will return the current instance of the same fragment.
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.