Aracılığıyla paylaş


LayerDrawable.SetDrawable(Int32, Drawable) Method

Definition

Sets the drawable for the layer at the specified index.

[Android.Runtime.Register("setDrawable", "(ILandroid/graphics/drawable/Drawable;)V", "GetSetDrawable_ILandroid_graphics_drawable_Drawable_Handler", ApiSince=23)]
public virtual void SetDrawable (int index, Android.Graphics.Drawables.Drawable? drawable);
[<Android.Runtime.Register("setDrawable", "(ILandroid/graphics/drawable/Drawable;)V", "GetSetDrawable_ILandroid_graphics_drawable_Drawable_Handler", ApiSince=23)>]
abstract member SetDrawable : int * Android.Graphics.Drawables.Drawable -> unit
override this.SetDrawable : int * Android.Graphics.Drawables.Drawable -> unit

Parameters

index
Int32

The index of the layer to modify, must be in the range 0...getNumberOfLayers()-1.

drawable
Drawable

The drawable to set for the layer.

Attributes

Remarks

Sets the drawable for the layer at the specified index.

Java documentation for android.graphics.drawable.LayerDrawable.setDrawable(int, android.graphics.drawable.Drawable).

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