共用方式為


TextView.SetCompoundDrawablesRelative 方法

定義

將 Drawables (如果有的話)設定為出現在上方、上方、結尾及文字下方的開頭。

[Android.Runtime.Register("setCompoundDrawablesRelative", "(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V", "GetSetCompoundDrawablesRelative_Landroid_graphics_drawable_Drawable_Landroid_graphics_drawable_Drawable_Landroid_graphics_drawable_Drawable_Landroid_graphics_drawable_Drawable_Handler")]
public virtual void SetCompoundDrawablesRelative (Android.Graphics.Drawables.Drawable? start, Android.Graphics.Drawables.Drawable? top, Android.Graphics.Drawables.Drawable? end, Android.Graphics.Drawables.Drawable? bottom);
[<Android.Runtime.Register("setCompoundDrawablesRelative", "(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V", "GetSetCompoundDrawablesRelative_Landroid_graphics_drawable_Drawable_Landroid_graphics_drawable_Drawable_Landroid_graphics_drawable_Drawable_Landroid_graphics_drawable_Drawable_Handler")>]
abstract member SetCompoundDrawablesRelative : Android.Graphics.Drawables.Drawable * Android.Graphics.Drawables.Drawable * Android.Graphics.Drawables.Drawable * Android.Graphics.Drawables.Drawable -> unit
override this.SetCompoundDrawablesRelative : Android.Graphics.Drawables.Drawable * Android.Graphics.Drawables.Drawable * Android.Graphics.Drawables.Drawable * Android.Graphics.Drawables.Drawable -> unit

參數

start
Drawable
top
Drawable
end
Drawable
bottom
Drawable
屬性

備註

將 Drawables (如果有的話)設定為出現在上方、上方、結尾及文字下方的開頭。 如果您不想在該處繪製可繪製,請使用 null 。 Drawables 必須已經 Drawable#setBounds 呼叫。

呼叫此方法將會覆寫先前使用 #setCompoundDrawables 或相關方法設定的任何 Drawables。

android.widget.TextView.setCompoundDrawablesRelative(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable)Java 檔。

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

適用於