다음을 통해 공유


CompoundButton.SetButtonDrawable Method

Definition

Overloads

SetButtonDrawable(Drawable)

Sets a drawable as the compound button image.

SetButtonDrawable(Int32)

Sets a drawable as the compound button image given its resource identifier.

SetButtonDrawable(Drawable)

Sets a drawable as the compound button image.

[Android.Runtime.Register("setButtonDrawable", "(Landroid/graphics/drawable/Drawable;)V", "GetSetButtonDrawable_Landroid_graphics_drawable_Drawable_Handler")]
public virtual void SetButtonDrawable (Android.Graphics.Drawables.Drawable? drawable);
[<Android.Runtime.Register("setButtonDrawable", "(Landroid/graphics/drawable/Drawable;)V", "GetSetButtonDrawable_Landroid_graphics_drawable_Drawable_Handler")>]
abstract member SetButtonDrawable : Android.Graphics.Drawables.Drawable -> unit
override this.SetButtonDrawable : Android.Graphics.Drawables.Drawable -> unit

Parameters

drawable
Drawable

the drawable to set

Attributes

Remarks

Sets a drawable as the compound button image.

Java documentation for android.widget.CompoundButton.setButtonDrawable(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

SetButtonDrawable(Int32)

Sets a drawable as the compound button image given its resource identifier.

[Android.Runtime.Register("setButtonDrawable", "(I)V", "GetSetButtonDrawable_IHandler")]
public virtual void SetButtonDrawable (int resId);
[<Android.Runtime.Register("setButtonDrawable", "(I)V", "GetSetButtonDrawable_IHandler")>]
abstract member SetButtonDrawable : int -> unit
override this.SetButtonDrawable : int -> unit

Parameters

resId
Int32

the resource identifier of the drawable

Attributes

Remarks

Sets a drawable as the compound button image given its resource identifier.

Java documentation for android.widget.CompoundButton.setButtonDrawable(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