次の方法で共有


Resources.ObtainAttributes(IAttributeSet, Int32[]) Method

Definition

Retrieve a set of basic attribute values from an AttributeSet, not performing styling of them using a theme and/or style resources.

[Android.Runtime.Register("obtainAttributes", "(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;", "GetObtainAttributes_Landroid_util_AttributeSet_arrayIHandler")]
public virtual Android.Content.Res.TypedArray? ObtainAttributes (Android.Util.IAttributeSet? set, int[]? attrs);
[<Android.Runtime.Register("obtainAttributes", "(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;", "GetObtainAttributes_Landroid_util_AttributeSet_arrayIHandler")>]
abstract member ObtainAttributes : Android.Util.IAttributeSet * int[] -> Android.Content.Res.TypedArray
override this.ObtainAttributes : Android.Util.IAttributeSet * int[] -> Android.Content.Res.TypedArray

Parameters

set
IAttributeSet

The current attribute values to retrieve.

attrs
Int32[]

The specific attributes to be retrieved. These attribute IDs must be sorted in ascending order.

Returns

Returns a TypedArray holding an array of the attribute values. Be sure to call TypedArray#recycle() TypedArray.recycle() when done with it.

Attributes

Remarks

Retrieve a set of basic attribute values from an AttributeSet, not performing styling of them using a theme and/or style resources.

Java documentation for android.content.res.Resources.obtainAttributes(android.util.AttributeSet, 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