java.lang.Object | |
↳ | 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
onDetachedFromWindow()
and from onVisibilityChanged(View, int)
when visibility != View.VISIBLE
.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ZoomButtonsController.OnZoomListener | 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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the container that is the parent of the zoom controls.
| |||||||||||
Gets the view for the zoom controls.
| |||||||||||
Whether the zoom controls will be automatically dismissed after showing.
| |||||||||||
Whether the zoom controls are visible to the user.
| |||||||||||
Sets whether the zoom controls will be automatically dismissed after
showing.
| |||||||||||
Sets whether the zoom controls should be focusable.
| |||||||||||
Sets the
ZoomButtonsController.OnZoomListener listener that receives callbacks to zoom. | |||||||||||
Sets whether the zoom controls should be visible to the user.
| |||||||||||
Whether to enable the zoom in control.
| |||||||||||
Whether to enable the zoom out control.
| |||||||||||
Sets the delay between zoom callbacks as the user holds a zoom button.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.view.View.OnTouchListener
|
Constructor for the ZoomButtonsController
.
ownerView | The view that is being zoomed by the zoom controls. The zoom controls will be displayed aligned with this view. |
---|
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.
Gets the view for the zoom controls.
Whether the zoom controls will be automatically dismissed after showing.
Whether the zoom controls are visible to the user.
Sets whether the zoom controls will be automatically dismissed after showing.
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.
focusable | Whether the zoom controls should be focusable. |
---|
Sets the ZoomButtonsController.OnZoomListener
listener that receives callbacks to zoom.
listener | The listener that will be told to zoom. |
---|
Sets whether the zoom controls should be visible to the user.
visible | Whether the zoom controls should be visible to the user. |
---|
Whether to enable the zoom in control.
enabled | Whether to enable the zoom in control. |
---|
Whether to enable the zoom out control.
enabled | Whether to enable the zoom out control. |
---|
Sets the delay between zoom callbacks as the user holds a zoom button.
speed | The delay in milliseconds between zoom callbacks. |
---|