本文整理了Java中android.app.Activity.dispatchGenericMotionEvent()
方法的一些代码示例,展示了Activity.dispatchGenericMotionEvent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Activity.dispatchGenericMotionEvent()
方法的具体详情如下:
包路径:android.app.Activity
类名称:Activity
方法名:dispatchGenericMotionEvent
暂无
代码示例来源:origin: com.uphyca/android-junit4-robolectric
/**
* @param ev
* @return
* @see android.app.Activity#dispatchGenericMotionEvent(android.view.MotionEvent)
*/
public boolean dispatchGenericMotionEvent(MotionEvent ev) {
return mActivity.dispatchGenericMotionEvent(ev);
}
代码示例来源:origin: iqiyi/Neptune
@Override
public boolean dispatchGenericMotionEvent(android.view.MotionEvent motionevent0) {
return mOriginActivity.dispatchGenericMotionEvent(motionevent0);
}
代码示例来源:origin: gearvrf/GearVRf-Demos
@Override
public boolean dispatchGenericMotionEvent(MotionEvent event) {
if (application.dispatchGenericMotionEvent(event)) {
return true;
}
return super.dispatchGenericMotionEvent(event);
}
代码示例来源:origin: bitcraze/crazyflie-android-client
@Override
public boolean dispatchGenericMotionEvent(MotionEvent event) {
// Check that the event came from a joystick since a generic motion event could be almost anything.
if ((event.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0 && event.getAction() == MotionEvent.ACTION_MOVE && mController instanceof GamepadController) {
mGamepadController.dealWithMotionEvent(event);
updateFlightData();
return true;
} else {
return super.dispatchGenericMotionEvent(event);
}
}
代码示例来源:origin: li2/learning-android-open-source
@Override
public boolean dispatchGenericMotionEvent(MotionEvent event) {
// Check that the event came from a joystick since a generic motion event
// could be almost anything.
if (event.isFromSource(InputDevice.SOURCE_CLASS_JOYSTICK)
&& event.getAction() == MotionEvent.ACTION_MOVE) {
// Update device state for visualization and logging.
InputDeviceState state = getInputDeviceState(event.getDeviceId());
if (state != null && state.onJoystickMotion(event)) {
mSummaryAdapter.show(state);
}
}
return super.dispatchGenericMotionEvent(event);
}
代码示例来源:origin: qiubiteme/android_api_demos
@Override
public boolean dispatchGenericMotionEvent(MotionEvent event) {
// Check that the event came from a joystick since a generic motion event
// could be almost anything.
if (event.isFromSource(InputDevice.SOURCE_CLASS_JOYSTICK)
&& event.getAction() == MotionEvent.ACTION_MOVE) {
// Update device state for visualization and logging.
InputDeviceState state = getInputDeviceState(event.getDeviceId());
if (state != null && state.onJoystickMotion(event)) {
mSummaryAdapter.show(state);
}
}
return super.dispatchGenericMotionEvent(event);
}
内容来源于网络,如有侵权,请联系作者删除!