Udostępnij za pośrednictwem


View.Tag Property

Definition

Returns this view's tag. -or- Sets the tag associated with this view.

public virtual Java.Lang.Object? Tag { [Android.Runtime.Register("getTag", "()Ljava/lang/Object;", "GetGetTagHandler")] get; [Android.Runtime.Register("setTag", "(Ljava/lang/Object;)V", "GetSetTag_Ljava_lang_Object_Handler")] set; }
[<get: Android.Runtime.Register("getTag", "()Ljava/lang/Object;", "GetGetTagHandler")>]
[<set: Android.Runtime.Register("setTag", "(Ljava/lang/Object;)V", "GetSetTag_Ljava_lang_Object_Handler")>]
member this.Tag : Java.Lang.Object with get, set

Property Value

the Object stored in this view as a tag, or null if not set

Attributes

Remarks

Property getter documentation:

Returns this view's tag.

Java documentation for android.view.View.getTag().

Property setter documentation:

Sets the tag associated with this view. A tag can be used to mark a view in its hierarchy and does not have to be unique within the hierarchy. Tags can also be used to store data within a view without resorting to another data structure.

Java documentation for android.view.View.setTag(java.lang.Object).

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

See also

  • GetTag(Int32)
  • Tag
  • <xref:Android.Views.View.SetTag(System.Int32%2c+Java.Lang.Object)>