Compartir a través de


IAttributeSet.GetAttributeNameResource(Int32) Method

Definition

Return the resource ID associated with the given attribute name.

[Android.Runtime.Register("getAttributeNameResource", "(I)I", "GetGetAttributeNameResource_IHandler:Android.Util.IAttributeSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int GetAttributeNameResource (int index);
[<Android.Runtime.Register("getAttributeNameResource", "(I)I", "GetGetAttributeNameResource_IHandler:Android.Util.IAttributeSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetAttributeNameResource : int -> int

Parameters

index
Int32

Index of the desired attribute, 0...count-1.

Returns

The resource identifier, 0 if none.

Attributes

Remarks

Return the resource ID associated with the given attribute name. This will be the identifier for an attribute resource, which can be used by styles. Returns 0 if there is no resource associated with this attribute.

Note that this is different than #getAttributeResourceValue in that it returns a resource identifier for the attribute name; the other method returns this attribute's value as a resource identifier.

Java documentation for android.util.AttributeSet.getAttributeNameResource(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