Udostępnij za pośrednictwem


Resources.ObtainTypedArray(Int32) Method

Definition

Return an array of heterogeneous values.

[Android.Runtime.Register("obtainTypedArray", "(I)Landroid/content/res/TypedArray;", "GetObtainTypedArray_IHandler")]
public virtual Android.Content.Res.TypedArray ObtainTypedArray (int id);
[<Android.Runtime.Register("obtainTypedArray", "(I)Landroid/content/res/TypedArray;", "GetObtainTypedArray_IHandler")>]
abstract member ObtainTypedArray : int -> Android.Content.Res.TypedArray
override this.ObtainTypedArray : int -> Android.Content.Res.TypedArray

Parameters

id
Int32

The desired resource identifier, as generated by the aapt tool. This integer encodes the package, type, and resource entry. The value 0 is an invalid identifier.

Returns

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

Attributes

Exceptions

Throws NotFoundException if the given ID does not exist.

Remarks

Return an array of heterogeneous values.

Java documentation for android.content.res.Resources.obtainTypedArray(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