다음을 통해 공유


View.Id Property

Definition

Returns this view's identifier. -or- Sets the identifier for this view.

public virtual int Id { [Android.Runtime.Register("getId", "()I", "GetGetIdHandler")] get; [Android.Runtime.Register("setId", "(I)V", "GetSetId_IHandler")] set; }
[<get: Android.Runtime.Register("getId", "()I", "GetGetIdHandler")>]
[<set: Android.Runtime.Register("setId", "(I)V", "GetSetId_IHandler")>]
member this.Id : int with get, set

Property Value

a positive integer used to identify the view or #NO_ID if the view has no ID

Attributes

Remarks

Property getter documentation:

Returns this view's identifier.

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

Property setter documentation:

Sets the identifier for this view. The identifier does not have to be unique in this view's hierarchy. The identifier should be a positive number.

Java documentation for android.view.View.setId(int).

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