Most visited

Recently visited

Added in API level 12

View.OnGenericMotionListener

public static interface View.OnGenericMotionListener

android.view.View.OnGenericMotionListener


将通用运动事件分派到此视图时调用回调的接口定义。 在通用运动事件被赋予视图之前,回调将被调用。

Summary

Public methods

abstract boolean onGenericMotion(View v, MotionEvent event)

当通用运动事件被分派到视图时调用。

Public methods

onGenericMotion

Added in API level 12
boolean onGenericMotion (View v, 
                MotionEvent event)

当通用运动事件被分派到视图时调用。 这使听众有机会在目标视图之前做出回应。

Parameters
v View: The view the generic motion event has been dispatched to.
event MotionEvent: The MotionEvent object containing full information about the event.
Returns
boolean True if the listener has consumed the event, false otherwise.

Hooray!