Udostępnij za pośrednictwem


TextView.SetCompoundDrawables(Drawable, Drawable, Drawable, Drawable) Method

Definition

Sets the Drawables (if any) to appear to the left of, above, to the right of, and below the text.

[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

Parameters

left
Drawable
top
Drawable
right
Drawable
bottom
Drawable
Attributes

Remarks

Sets the Drawables (if any) to appear to the left of, above, to the right of, and below the text. Use null if you do not want a Drawable there. The Drawables must already have had Drawable#setBounds called.

Calling this method will overwrite any Drawables previously set using #setCompoundDrawablesRelative or related methods.

Java documentation for android.widget.TextView.setCompoundDrawables(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to