Aracılığıyla paylaş


TypedArray.GetDrawable(Int32) Method

Definition

Retrieve the Drawable for the attribute at <var>index</var>.

[Android.Runtime.Register("getDrawable", "(I)Landroid/graphics/drawable/Drawable;", "GetGetDrawable_IHandler")]
public virtual Android.Graphics.Drawables.Drawable? GetDrawable (int index);
[<Android.Runtime.Register("getDrawable", "(I)Landroid/graphics/drawable/Drawable;", "GetGetDrawable_IHandler")>]
abstract member GetDrawable : int -> Android.Graphics.Drawables.Drawable
override this.GetDrawable : int -> Android.Graphics.Drawables.Drawable

Parameters

index
Int32

Index of attribute to retrieve.

Returns

Drawable for the attribute, or null if not defined.

Attributes

Exceptions

if the TypedArray has already been recycled.

if the attribute is defined but is not a color or drawable resource.

Remarks

Retrieve the Drawable for the attribute at <var>index</var>.

This method will throw an exception if the attribute is defined but is not a color or drawable resource.

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