Läs på engelska

Dela via


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.

C#
[Android.Runtime.Register("findFragmentByTag", "(Ljava/lang/String;)Landroid/app/Fragment;", "GetFindFragmentByTag_Ljava_lang_String_Handler")]
public abstract Android.App.Fragment? FindFragmentByTag(string? tag);

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

.NET for Android .NET for Android API 35 och .NET for Android .NET for Android API 34
Produkt Versioner
.NET for Android .NET for Android API 34, .NET for Android API 35

FindFragmentByTag<T>(String)

C#
public T? FindFragmentByTag<T>(string tag) where 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

.NET for Android .NET for Android API 35 och .NET for Android .NET for Android API 34
Produkt Versioner
.NET for Android .NET for Android API 34, .NET for Android API 35