语言

TextView.SetCompoundDrawablesRelative 方法

定义

将绘图器(如果有)设置为文本的开头、上方和末尾。

[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

可绘制:此值可能为 null。

top
Drawable

可绘制:此值可能为 null。

end
Drawable

可绘制:此值可能为 null。

bottom
Drawable

可绘制:此值可能为 null。

特性

注解

将绘图器(如果有)设置为文本的开头、上方和末尾。 如果不希望在其中绘制可绘制,请使用 null 。 绘图器必须已 Drawable#setBounds 调用。

调用此方法将覆盖以前使用 #setCompoundDrawables 或相关方法设置的任何 Drawables。

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

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于