Added in API level 4
Deprecated in API level 26

ZoomButtonsController


open class ZoomButtonsController : View.OnTouchListener
kotlin.Any
   ↳ android.widget.ZoomButtonsController

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
abstract

Interface that will be called when the user performs an interaction that triggers some action, for example zooming.

Public constructors

Constructor for the ZoomButtonsController.

Public methods
open ViewGroup!

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

open View!

Gets the view for the zoom controls.

open Boolean

Whether the zoom controls will be automatically dismissed after showing.

open Boolean

Whether the zoom controls are visible to the user.

open Unit
setAutoDismissed(autoDismiss: Boolean)

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

open Unit
setFocusable(focusable: Boolean)

Sets whether the zoom controls should be focusable.

open Unit

Sets the OnZoomListener listener that receives callbacks to zoom.

open Unit
setVisible(visible: Boolean)

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

open Unit

Whether to enable the zoom in control.

open Unit

Whether to enable the zoom out control.

open Unit

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

Public constructors

ZoomButtonsController

Added in API level 4
ZoomButtonsController(ownerView: View!)

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

Added in API level 4
open fun getContainer(): ViewGroup!

Deprecated: Deprecated in Java.

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.

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

getZoomControls

Added in API level 4
open fun getZoomControls(): View!

Deprecated: Deprecated in Java.

Gets the view for the zoom controls.

Return
View! The zoom controls view.

isAutoDismissed

Added in API level 4
open fun isAutoDismissed(): Boolean

Deprecated: Deprecated in Java.

Whether the zoom controls will be automatically dismissed after showing.

Return
Boolean Whether the zoom controls will be auto dismissed after showing.

isVisible

Added in API level 4
open fun isVisible(): Boolean

Deprecated: Deprecated in Java.

Whether the zoom controls are visible to the user.

Return
Boolean Whether the zoom controls are visible to the user.

setAutoDismissed

Added in API level 4
open fun setAutoDismissed(autoDismiss: Boolean): Unit

Deprecated: Deprecated in Java.

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

setFocusable

Added in API level 4
open fun setFocusable(focusable: Boolean): Unit

Deprecated: Deprecated in Java.

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

Added in API level 4
open fun setOnZoomListener(listener: ZoomButtonsController.OnZoomListener!): Unit

Deprecated: Deprecated in Java.

Sets the OnZoomListener listener that receives callbacks to zoom.

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

setVisible

Added in API level 4
open fun setVisible(visible: Boolean): Unit

Deprecated: Deprecated in Java.

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

Added in API level 4
open fun setZoomInEnabled(enabled: Boolean): Unit

Deprecated: Deprecated in Java.

Whether to enable the zoom in control.

Parameters
enabled Boolean: Whether to enable the zoom in control.

setZoomOutEnabled

Added in API level 4
open fun setZoomOutEnabled(enabled: Boolean): Unit

Deprecated: Deprecated in Java.

Whether to enable the zoom out control.

Parameters
enabled Boolean: Whether to enable the zoom out control.

setZoomSpeed

Added in API level 4
open fun setZoomSpeed(speed: Long): Unit

Deprecated: Deprecated in Java.

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

Parameters
speed Long: The delay in milliseconds between zoom callbacks.