Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public class

ViewOverlay

extends Object
java.lang.Object
   ↳ android.view.ViewOverlay
Known Direct Subclasses

Class Overview

An overlay is an extra layer that sits on top of a View (the "host view") which is drawn after all other content in that view (including children, if the view is a ViewGroup). Interaction with the overlay layer is done by adding and removing drawables.

An overlay requested from a ViewGroup is of type ViewGroupOverlay , which also supports adding and removing views.

Summary

Public Methods
void add ( Drawable drawable)
Adds a Drawable to the overlay.
void clear ()
Removes all content from the overlay.
void remove ( Drawable drawable)
Removes the specified Drawable from the overlay.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public void add ( Drawable drawable)

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.

Parameters
drawable The Drawable to be added to the overlay. This drawable will be drawn when the view redraws its overlay.

public void clear ()

Removes all content from the overlay.

public void remove ( Drawable drawable)

Removes the specified Drawable from the overlay.

Parameters
drawable The Drawable to be removed from the overlay.