# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Methods | Inherited Methods

# ViewGroupOverlay

`public class ViewGroupOverlay`
`` `extends ViewOverlay` ``

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

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.

See also:

- `ViewGroup.getOverlay()`

## Summary

### Public methods
`void` | `add(View view)` Adds a `View` to the overlay.
`void` | `remove(View view)` Removes the specified `View` from the overlay.

### Inherited methods
From class `android.view.ViewOverlay`
`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.
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Public methods

### add

    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).

`View`s added with this API will be drawn in the order they were added. Drawing of the overlay views will happen before drawing of any of the `Drawable`s added with `ViewOverlay.add(android.graphics.drawable.Drawable)` API even if a call to this API happened after the call to `ViewOverlay.add(android.graphics.drawable.Drawable)`.

Passing `null` parameter will result in an `IllegalArgumentException` being thrown.

Parameters
`view` | `View`: The `View` to be added to the overlay. The added view will be drawn when the overlay is drawn. This value cannot be `null`.

See also:

- `remove(View)`
- `ViewOverlay.add(Drawable)`

### remove

    public void remove (View view)

Removes the specified `View` from the overlay. Passing `null` parameter will result in an `IllegalArgumentException` being thrown.

Parameters
`view` | `View`: The `View` to be removed from the overlay. This value cannot be `null`.

See also:

- `add(View)`
- `ViewOverlay.remove(Drawable)`

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*