Crowdfunding project updates

1 In the case of only one screen, the two-finger trigger movement will crash

Solution:
If there are no 2 screens, no movement operation will be triggered at all.
insert image description here
Code:

@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;
    }
    //省略其他
    }

Guess you like

Origin blog.csdn.net/learnframework/article/details/130549141