語言

TextView.SetCompoundDrawables(Drawable, Drawable, Drawable, Drawable) 方法

定義

將 Drawables (如果有的話)設定為出現在文字的左邊、上方、右邊和下方。

[Android.Runtime.Register("setCompoundDrawables", "(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V", "GetSetCompoundDrawables_Landroid_graphics_drawable_Drawable_Landroid_graphics_drawable_Drawable_Landroid_graphics_drawable_Drawable_Landroid_graphics_drawable_Drawable_Handler")]
public virtual void SetCompoundDrawables(Android.Graphics.Drawables.Drawable? left, Android.Graphics.Drawables.Drawable? top, Android.Graphics.Drawables.Drawable? right, Android.Graphics.Drawables.Drawable? bottom);
[<Android.Runtime.Register("setCompoundDrawables", "(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V", "GetSetCompoundDrawables_Landroid_graphics_drawable_Drawable_Landroid_graphics_drawable_Drawable_Landroid_graphics_drawable_Drawable_Landroid_graphics_drawable_Drawable_Handler")>]
abstract member SetCompoundDrawables : Android.Graphics.Drawables.Drawable * Android.Graphics.Drawables.Drawable * Android.Graphics.Drawables.Drawable * Android.Graphics.Drawables.Drawable -> unit
override this.SetCompoundDrawables : Android.Graphics.Drawables.Drawable * Android.Graphics.Drawables.Drawable * Android.Graphics.Drawables.Drawable * Android.Graphics.Drawables.Drawable -> unit

參數

left
Drawable

可繪製:此值可能為零。

top
Drawable

可繪製:此值可能為零。

right
Drawable

可繪製:此值可能為零。

bottom
Drawable

可繪製:此值可能為零。

屬性

備註

將 Drawables (如果有的話)設定為出現在文字的左邊、上方、右邊和下方。 如果你不想在那邊有可繪製物件,就用 null 它。 Drawables一定已經打 Drawable#setBounds 過電話了。

呼叫此方法會覆寫先前使用 #setCompoundDrawablesRelative 或相關方法設定的任何可繪圖物件。

Java 文件 android.widget.TextView.setCompoundDrawables(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable)

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於