다음을 통해 공유


ViewOverlay.Add(Drawable) Method

Definition

Adds a Drawable to the overlay.

[Android.Runtime.Register("add", "(Landroid/graphics/drawable/Drawable;)V", "GetAdd_Landroid_graphics_drawable_Drawable_Handler")]
public virtual void Add (Android.Graphics.Drawables.Drawable drawable);
[<Android.Runtime.Register("add", "(Landroid/graphics/drawable/Drawable;)V", "GetAdd_Landroid_graphics_drawable_Drawable_Handler")>]
abstract member Add : Android.Graphics.Drawables.Drawable -> unit
override this.Add : Android.Graphics.Drawables.Drawable -> unit

Parameters

drawable
Drawable

The Drawable to be added to the overlay. This drawable will be drawn when the view redraws its overlay. Drawables will be drawn in the order that they were added.

Attributes

Remarks

Adds a Drawable to the overlay. The bounds of the drawable should be relative to the host view. Any drawable added to the overlay should be removed when it is no longer needed or no longer visible. Adding an already existing Drawable is a no-op. Passing null parameter will result in an IllegalArgumentException being thrown.

Java documentation for android.view.ViewOverlay.add(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

See also