public static interface ScaleGestureDetector.OnScaleGestureListener
android.view.ScaleGestureDetector.OnScaleGestureListener |
Known Indirect Subclasses |
手势发生时接收通知的监听器。 如果你想听所有不同的手势然后实现这个接口。 如果你只想听一个子集,可能会更容易扩展ScaleGestureDetector.SimpleOnScaleGestureListener
。 应用程序将按以下顺序接收事件:
onScaleBegin(ScaleGestureDetector)
onScale(ScaleGestureDetector)
onScaleEnd(ScaleGestureDetector)
Public methods |
|
---|---|
abstract boolean |
onScale(ScaleGestureDetector detector) 响应正在进行的手势的缩放事件。 |
abstract boolean |
onScaleBegin(ScaleGestureDetector detector) 响应缩放手势的开始。 |
abstract void |
onScaleEnd(ScaleGestureDetector detector) 回应缩放手势的结尾。 |
boolean onScale (ScaleGestureDetector detector)
响应正在进行的手势的缩放事件。 指针运动报告。
Parameters | |
---|---|
detector |
ScaleGestureDetector : The detector reporting the event - use this to retrieve extended info about event state. |
Returns | |
---|---|
boolean |
Whether or not the detector should consider this event as handled. If an event was not handled, the detector will continue to accumulate movement until an event is handled. This can be useful if an application, for example, only wants to update scaling factors if the change is greater than 0.01. |
boolean onScaleBegin (ScaleGestureDetector detector)
响应缩放手势的开始。 新指针报道下跌。
Parameters | |
---|---|
detector |
ScaleGestureDetector : The detector reporting the event - use this to retrieve extended info about event state. |
Returns | |
---|---|
boolean |
Whether or not the detector should continue recognizing this gesture. For example, if a gesture is beginning with a focal point outside of a region where it makes sense, onScaleBegin() may return false to ignore the rest of the gesture. |
void onScaleEnd (ScaleGestureDetector detector)
回应缩放手势的结尾。 现有指针正在上升。 一旦比例结束, getFocusX()
和getFocusY()
将返回屏幕上剩余指针的焦点。
Parameters | |
---|---|
detector |
ScaleGestureDetector : The detector reporting the event - use this to retrieve extended info about event state. |