FragmentManager.GetFragment 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
GetFragment(Bundle, String) |
Retrieve the current Fragment instance for a reference previously
placed with |
GetFragment<T>(Bundle, String) |
GetFragment(Bundle, String)
Retrieve the current Fragment instance for a reference previously
placed with #putFragment(Bundle, String, Fragment)
.
[Android.Runtime.Register("getFragment", "(Landroid/os/Bundle;Ljava/lang/String;)Landroid/app/Fragment;", "GetGetFragment_Landroid_os_Bundle_Ljava_lang_String_Handler")]
public abstract Android.App.Fragment? GetFragment (Android.OS.Bundle? bundle, string? key);
[<Android.Runtime.Register("getFragment", "(Landroid/os/Bundle;Ljava/lang/String;)Landroid/app/Fragment;", "GetGetFragment_Landroid_os_Bundle_Ljava_lang_String_Handler")>]
abstract member GetFragment : Android.OS.Bundle * string -> Android.App.Fragment
Parameters
- bundle
- Bundle
The bundle from which to retrieve the fragment reference.
- key
- String
The name of the entry in the bundle.
Returns
Returns the current Fragment instance that is associated with the given reference.
- Attributes
Remarks
Retrieve the current Fragment instance for a reference previously placed with #putFragment(Bundle, String, Fragment)
.
Java documentation for android.app.FragmentManager.getFragment(android.os.Bundle, java.lang.String)
.
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
GetFragment<T>(Bundle, String)
public T? GetFragment<T> (Android.OS.Bundle bundle, string key) where T : Android.App.Fragment;
member this.GetFragment : Android.OS.Bundle * string -> 'T (requires 'T :> Android.App.Fragment)
Type Parameters
- T
Parameters
- bundle
- Bundle
- key
- String
Returns
Remarks
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.