• public static int[] GetTouchActionAndPointerIndex(MotionEvent event) {  
  •     int action = event.getAction();  
  •     int ptrIndex = 0;  
  •     if (event.getPointerCount() > 1) {  
  •         int ptrId = (action & MotionEvent.ACTION_POINTER_ID_MASK) >>> MotionEvent.ACTION_POINTER_ID_SHIFT;  
  •         action = action & MotionEvent.ACTION_MASK;  
  •         if (action < 7 && action > 4) {  
  •             action = action - 5;  
  •         }  
  •         ptrIndex = event.findPointerIndex(ptrId);  
  •     }  
  •     return new int[] { action, ptrIndex };  
  • }  

相关文章:

  • 2022-01-31
  • 2022-01-01
  • 2021-07-07
  • 2021-05-19
  • 2021-09-18
  • 2022-12-23
  • 2021-05-17
  • 2022-12-23
猜你喜欢
  • 2021-06-20
  • 2021-07-03
  • 2021-07-18
  • 2022-12-23
  • 2021-12-05
相关资源
相似解决方案