Android7.0中文文档(API)-- ZoomButtonsController

完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/ZoomButtonsController.html

ZoomButtonsController

public class ZoomButtonsController
extends Object implements View.OnTouchListener

java.lang.Object
   ↳ android.widget.ZoomButtonsController


This class was deprecated in API level O.
This functionality and UI is better handled with custom views and layouts rather than a dedicated zoom-control widget
这个类在API Level O中已被删除。
这个功能和UI更好地处理自定义视图和布局,而不是一个专用的缩放控制控件。

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.
ZoomButtonsController用于显示和隐藏缩放控件,并将其放置在自己的视图中。它还允许客户端访问缩放控件容器,允许在缩放控件窗口中显示额外的按钮。

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).
通常,客户端应该在触摸或移动时调用setVisible(true)(不需要调用setVisible(false),它将在超时后,自动执行)。另外,当所有者不能进一步缩放时,客户端应该更新setZoomInEnabled(boolean)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.
如果你将此功能用在自定义视图上,则当visibility != View.VISIBLE时,请在onDetachedFromWindow()onVisibilityChanged(View, int)中调用setVisible(false)

摘要


嵌套类

interface ZoomButtonsController.OnZoomListener

Interface that will be called when the user performs an interaction that triggers some action, for example zooming. 
当用户执行一个触发某些动作的交互时,例如缩放,就会调用这个接口。 

Public构造方法

ZoomButtonsController(View ownerView)

Constructor for the ZoomButtonsController.
ZoomButtonsController的构造方法。

你可能感兴趣的:(Android)