Android 3 finger touch detection

前端 未结 4 587
梦谈多话
梦谈多话 2021-01-12 23:38

I am successfully able to record the coordinates of the two fingers being touched on the screen using the following code:

case MotionEvent.ACTION_MOVE:
Log.d         


        
相关标签:
4条回答
  • 2021-01-12 23:56
         firstFingerX = MotionEventCompat.getX(ev, 0); firstFingerY = MotionEventCompat.getY(ev, 0);
     if (numberOfFingers == 2) {
         Log.e("mine", "Integer: " + String.valueOf((int)MotionEventCompat.getY(ev, 1)));
         secondFingerX = MotionEventCompat.getX(ev, 1); secondFingerY = MotionEventCompat.getY(ev, 1);
     }
     if (numberOfFingers == 3) {
         Log.e("mine", "Integer: " + String.valueOf((int)MotionEventCompat.getY(ev, 2)));
         thirdFingerX = MotionEventCompat.getX(ev, 2); thirdFingerY = MotionEventCompat.getY(ev, 2);
    
     }
    
    0 讨论(0)
  • 2021-01-13 00:07

    multitouch which uses more than two fingers can only be performed in android 4.1.2 version or above and also different companies have customized the android versions according to their needs and apps i.e in 4.1.2 version the Qmobile just support five fingures but the great samsung company uses more than 11 fingers

    0 讨论(0)
  • 2021-01-13 00:10

    This was asked some time ago, but anyway. The answer is that although android could track 256 fingers, the current implementation limits this to 2 fingers.

    I'm not sure about honeycomb, but I guess that it has the same "issue".

    0 讨论(0)
  • 2021-01-13 00:18

    I've confirmed 4 touches on some Android 2.3.5 devices, and every 3.x and 4.x device I've tested so far. It seems that at least from API 8+, more than two touches is supported, but it's device-dependent.

    0 讨论(0)
提交回复
热议问题