Freigeben über


FragmentManager.FindFragmentByTag Method

Definition

Overloads

FindFragmentByTag(String)

Finds a fragment that was identified by the given tag either when inflated from XML or as supplied when added in a transaction.

FindFragmentByTag<T>(String)

FindFragmentByTag(String)

Finds a fragment that was identified by the given tag either when inflated from XML or as supplied when added in a transaction.

[Android.Runtime.Register("findFragmentByTag", "(Ljava/lang/String;)Landroid/app/Fragment;", "GetFindFragmentByTag_Ljava_lang_String_Handler")]
public abstract Android.App.Fragment? FindFragmentByTag (string? tag);
[<Android.Runtime.Register("findFragmentByTag", "(Ljava/lang/String;)Landroid/app/Fragment;", "GetFindFragmentByTag_Ljava_lang_String_Handler")>]
abstract member FindFragmentByTag : string -> Android.App.Fragment

Parameters

tag
String

Returns

The fragment if found or null otherwise.

Attributes

Remarks

Finds a fragment that was identified by the given tag either when inflated from XML or as supplied when added in a transaction. This first searches through fragments that are currently added to the manager's activity; if no such fragment is found, then all fragments currently on the back stack are searched.

Java documentation for android.app.FragmentManager.findFragmentByTag(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

FindFragmentByTag<T>(String)

public T? FindFragmentByTag<T> (string tag) where T : Android.App.Fragment;
member this.FindFragmentByTag : string -> 'T (requires 'T :> Android.App.Fragment)

Type Parameters

T

Parameters

tag
String

Returns

T

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.

Applies to