1 只有一个屏幕情况下,双指触发移动会crash
解决办法:
如果没有2个屏幕,则压根不触发任何移动操作
代码:
@Override
public void onPointerEvent(MotionEvent motionEvent) {
android.util.Log.i("DoubleScreenTouch","DoubleScreenMovePointerEventListener onPointerEvent motionEvent = "+motionEvent + " mService.mRoot.getChildCount() = " +mService.mRoot.getChildCount());
if (mService.mRoot.getChildCount() != 2) {
return;
}
//省略其他
}