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

ViewGroupOverlay

extends ViewOverlay
java.lang.Object
   ↳ android.view.ViewOverlay
     ↳ android.view.ViewGroupOverlay

Class Overview

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

ViewGroupOverlay is a subclass of ViewOverlay , adding the ability to manage views for overlays on ViewGroups, in addition to the drawable support in ViewOverlay.

Summary

Public Methods
void add ( View view)
Adds a View to the overlay.
void remove ( View view)
Removes the specified View from the overlay.
[Expand]
Inherited Methods
From class android.view.ViewOverlay
From class java.lang.Object

Public Methods

public void add ( View view)

Adds a View to the overlay. The bounds of the added view should be relative to the host view. Any view added to the overlay should be removed when it is no longer needed or no longer visible.

Views in the overlay are visual-only; they do not receive input events and do not participate in focus traversal. Overlay views are intended to be transient, such as might be needed by a temporary animation effect.

If the view has a parent, the view will be removed from that parent before being added to the overlay. Also, if that parent is attached in the current view hierarchy, the view will be repositioned such that it is in the same relative location inside the activity. For example, if the view's current parent lies 100 pixels to the right and 200 pixels down from the origin of the overlay's host view, then the view will be offset by (100, 200).

Parameters
view The View to be added to the overlay. The added view will be drawn when the overlay is drawn.

public void remove ( View view)

Removes the specified View from the overlay.

Parameters
view The View to be removed from the overlay.