CompoundButton.SetButtonIcon(Icon) 方法

定義

將這個 CompoundButton 的按鈕設定為指定的圖示。

[Android.Runtime.Register("setButtonIcon", "(Landroid/graphics/drawable/Icon;)V", "GetSetButtonIcon_Landroid_graphics_drawable_Icon_Handler", ApiSince=31)]
public virtual void SetButtonIcon (Android.Graphics.Drawables.Icon? icon);
[<Android.Runtime.Register("setButtonIcon", "(Landroid/graphics/drawable/Icon;)V", "GetSetButtonIcon_Landroid_graphics_drawable_Icon_Handler", ApiSince=31)>]
abstract member SetButtonIcon : Android.Graphics.Drawables.Icon -> unit
override this.SetButtonIcon : Android.Graphics.Drawables.Icon -> unit

參數

icon
Icon

按住所需按鈕的圖示,或 null 清除按鈕

屬性

備註

將這個 CompoundButton 的按鈕設定為指定的圖示。

android.widget.CompoundButton.setButtonIcon(android.graphics.drawable.Icon)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於