Compartilhar via


LayerDrawable.FindDrawableByLayerId(Int32) Method

Definition

Looks for a layer with the given ID and returns its Drawable.

[Android.Runtime.Register("findDrawableByLayerId", "(I)Landroid/graphics/drawable/Drawable;", "GetFindDrawableByLayerId_IHandler")]
public virtual Android.Graphics.Drawables.Drawable? FindDrawableByLayerId (int id);
[<Android.Runtime.Register("findDrawableByLayerId", "(I)Landroid/graphics/drawable/Drawable;", "GetFindDrawableByLayerId_IHandler")>]
abstract member FindDrawableByLayerId : int -> Android.Graphics.Drawables.Drawable
override this.FindDrawableByLayerId : int -> Android.Graphics.Drawables.Drawable

Parameters

id
Int32

The layer ID to search for.

Returns

The Drawable for the highest-indexed layer that has the given ID, or null if not found.

Attributes

Remarks

Looks for a layer with the given ID and returns its Drawable.

If multiple layers are found for the given ID, returns the Drawable for the matching layer at the highest index.

Java documentation for android.graphics.drawable.LayerDrawable.findDrawableByLayerId(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