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

定义

设置可绘制 (如果有任何) 显示在文本左侧、上方、右侧和下方。

[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
属性

注解

设置可绘制 (如果有任何) 显示在文本左侧、上方、右侧和下方。 如果不想在其中使用 Drawable,请使用 null 。 Drawables 必须已 Drawable#setBounds 调用。

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

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

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

适用于