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
top
Drawable
end
Drawable
bottom
Drawable
属性

注解

将绘图器(如果有)设置为文本的开头、上方和末尾。 如果不希望在其中绘制可绘制,请使用 null 。 绘图器必须已 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 属性许可证中所述的术语使用。

适用于