Android Guides | Samples

Android.Graphics.Drawables.LayerDrawable.SetDrawableByLayerId Method

Replaces the Drawable for the layer with the given id.

Syntax

[Android.Runtime.Register("setDrawableByLayerId", "(ILandroid/graphics/drawable/Drawable;)Z", "GetSetDrawableByLayerId_ILandroid_graphics_drawable_Drawable_Handler")]
public virtual Boolean SetDrawableByLayerId (Int32 id, Drawable drawable)

Parameters

id
The layer ID to search for.
drawable
The replacement Drawable.

Remarks

Replaces the Drawable for the layer with the given id.

[Android Documentation]

Requirements

Namespace: Android.Graphics.Drawables
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1