# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Nested Classes | Ctors | Methods | Inherited Methods

# ZoomButtonsController

`public class ZoomButtonsController`
`extends Object` `implements View.OnTouchListener`

java.lang.Object
↳ | android.widget.ZoomButtonsController

This class is deprecated.
This functionality and UI is better handled with custom views and layouts rather than a dedicated zoom-control widget

The `ZoomButtonsController` handles showing and hiding the zoom controls and positioning it relative to an owner view. It also gives the client access to the zoom controls container, allowing for additional accessory buttons to be shown in the zoom controls window.

Typically, clients should call `setVisible(true)` on a touch down or move (no need to call `setVisible(false)` since it will time out on its own). Also, whenever the owner cannot be zoomed further, the client should update `setZoomInEnabled(boolean)` and `setZoomOutEnabled(boolean)`.

If you are using this with a custom View, please call `setVisible(false)` from `View#onDetachedFromWindow` and from `View#onVisibilityChanged` when `visibility != View.VISIBLE`.

## Summary

### Nested classes
`interface` | `ZoomButtonsController.OnZoomListener` Interface that will be called when the user performs an interaction that triggers some action, for example zooming.

### Public constructors
`ZoomButtonsController(View ownerView)` Constructor for the `ZoomButtonsController`.

### Public methods
`ViewGroup` | `getContainer()` Gets the container that is the parent of the zoom controls.
`View` | `getZoomControls()` Gets the view for the zoom controls.
`boolean` | `isAutoDismissed()` Whether the zoom controls will be automatically dismissed after showing.
`boolean` | `isVisible()` Whether the zoom controls are visible to the user.
`void` | `setAutoDismissed(boolean autoDismiss)` Sets whether the zoom controls will be automatically dismissed after showing.
`void` | `setFocusable(boolean focusable)` Sets whether the zoom controls should be focusable.
`void` | `setOnZoomListener(ZoomButtonsController.OnZoomListener listener)` Sets the `OnZoomListener` listener that receives callbacks to zoom.
`void` | `setVisible(boolean visible)` Sets whether the zoom controls should be visible to the user.
`void` | `setZoomInEnabled(boolean enabled)` Whether to enable the zoom in control.
`void` | `setZoomOutEnabled(boolean enabled)` Whether to enable the zoom out control.
`void` | `setZoomSpeed(long speed)` Sets the delay between zoom callbacks as the user holds a zoom button.

### Inherited methods
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.
From interface `android.view.View.OnTouchListener`
`abstract boolean` | `onTouch(View v, MotionEvent event)` Called when a touch event is dispatched to a view.

## Public constructors

### ZoomButtonsController

    public ZoomButtonsController (View ownerView)

Constructor for the `ZoomButtonsController`.

Parameters
`ownerView` | `View`: The view that is being zoomed by the zoom controls. The zoom controls will be displayed aligned with this view.

## Public methods

### getContainer

    public ViewGroup getContainer ()

Gets the container that is the parent of the zoom controls.

The client can add other views to this container to link them with the zoom controls.

Returns
`ViewGroup` | The container of the zoom controls. It will be a layout that respects the gravity of a child's layout parameters.

### getZoomControls

    public View getZoomControls ()

Gets the view for the zoom controls.

Returns
`View` | The zoom controls view.

### isAutoDismissed

    public boolean isAutoDismissed ()

Whether the zoom controls will be automatically dismissed after showing.

Returns
`boolean` | Whether the zoom controls will be auto dismissed after showing.

### isVisible

    public boolean isVisible ()

Whether the zoom controls are visible to the user.

Returns
`boolean` | Whether the zoom controls are visible to the user.

### setAutoDismissed

    public void setAutoDismissed (boolean autoDismiss)

Sets whether the zoom controls will be automatically dismissed after showing.

Parameters
`autoDismiss` | `boolean`

### setFocusable

    public void setFocusable (boolean focusable)

Sets whether the zoom controls should be focusable. If the controls are focusable, then trackball and arrow key interactions are possible. Otherwise, only touch interactions are possible.

Parameters
`focusable` | `boolean`: Whether the zoom controls should be focusable.

### setOnZoomListener

    public void setOnZoomListener (ZoomButtonsController.OnZoomListener listener)

Sets the `OnZoomListener` listener that receives callbacks to zoom.

Parameters
`listener` | `ZoomButtonsController.OnZoomListener`: The listener that will be told to zoom.

### setVisible

    public void setVisible (boolean visible)

Sets whether the zoom controls should be visible to the user.

Parameters
`visible` | `boolean`: Whether the zoom controls should be visible to the user.

### setZoomInEnabled

    public void setZoomInEnabled (boolean enabled)

Whether to enable the zoom in control.

Parameters
`enabled` | `boolean`: Whether to enable the zoom in control.

### setZoomOutEnabled

    public void setZoomOutEnabled (boolean enabled)

Whether to enable the zoom out control.

Parameters
`enabled` | `boolean`: Whether to enable the zoom out control.

### setZoomSpeed

    public void setZoomSpeed (long speed)

Sets the delay between zoom callbacks as the user holds a zoom button.

Parameters
`speed` | `long`: The delay in milliseconds between zoom callbacks.

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