ZoomButtonsController
open classZoomButtonsController: 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 | |
---|---|
ZoomButtonsController(ownerView: View!) Constructor for the |
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 |
open Unit |
setVisible(visible: Boolean) Sets whether the zoom controls should be visible to the user. |
open Unit |
setZoomInEnabled(enabled: Boolean) Whether to enable the zoom in control. |
open Unit |
setZoomOutEnabled(enabled: Boolean) Whether to enable the zoom out control. |
open Unit |
setZoomSpeed(speed: Long) Sets the delay between zoom callbacks as the user holds a zoom button. |
Public constructors
ZoomButtonsController
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
open fungetContainer(): 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
open fungetZoomControls(): View!
Deprecated: Deprecated in Java.
Gets the view for the zoom controls.
Return | |
---|---|
View! |
The zoom controls view. |
isAutoDismissed
open funisAutoDismissed(): 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
open funisVisible(): 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
open funsetAutoDismissed(autoDismiss: Boolean): Unit
Deprecated: Deprecated in Java.
Sets whether the zoom controls will be automatically dismissed after showing.
setFocusable
open funsetFocusable(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
open funsetOnZoomListener(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
open funsetVisible(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
open funsetZoomInEnabled(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
open funsetZoomOutEnabled(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
open funsetZoomSpeed(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. |