Compartilhar via


IAttributeSet.GetAttributeResourceValue Method

Definition

Overloads

GetAttributeResourceValue(Int32, Int32)

Return the value of attribute at 'index' as a resource identifier.

GetAttributeResourceValue(String, String, Int32)

Return the value of 'attribute' as a resource identifier.

GetAttributeResourceValue(Int32, Int32)

Return the value of attribute at 'index' as a resource identifier.

[Android.Runtime.Register("getAttributeResourceValue", "(II)I", "GetGetAttributeResourceValue_IIHandler:Android.Util.IAttributeSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int GetAttributeResourceValue (int index, int defaultValue);
[<Android.Runtime.Register("getAttributeResourceValue", "(II)I", "GetGetAttributeResourceValue_IIHandler:Android.Util.IAttributeSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetAttributeResourceValue : int * int -> int

Parameters

index
Int32

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

defaultValue
Int32

What to return if the attribute isn't found.

Returns

Resulting value.

Attributes

Remarks

Return the value of attribute at 'index' as a resource identifier.

Note that this is different than #getAttributeNameResource in that it returns the value contained in this attribute as a resource identifier (i.e., a value originally of the form "

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

GetAttributeResourceValue(String, String, Int32)

Return the value of 'attribute' as a resource identifier.

[Android.Runtime.Register("getAttributeResourceValue", "(Ljava/lang/String;Ljava/lang/String;I)I", "GetGetAttributeResourceValue_Ljava_lang_String_Ljava_lang_String_IHandler:Android.Util.IAttributeSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int GetAttributeResourceValue (string? namespace, string? attribute, int defaultValue);
[<Android.Runtime.Register("getAttributeResourceValue", "(Ljava/lang/String;Ljava/lang/String;I)I", "GetGetAttributeResourceValue_Ljava_lang_String_Ljava_lang_String_IHandler:Android.Util.IAttributeSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetAttributeResourceValue : string * string * int -> int

Parameters

namespace
String

Namespace of attribute to retrieve.

attribute
String

The attribute to retrieve.

defaultValue
Int32

What to return if the attribute isn't found.

Returns

Resulting value.

Attributes

Remarks

Return the value of 'attribute' as a resource identifier.

Note that this is different than #getAttributeNameResource in that it returns the value contained in this attribute as a resource identifier (i.e., a value originally of the form "

Java documentation for android.util.AttributeSet.getAttributeResourceValue(java.lang.String, java.lang.String, 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