getAction() returns a pointer id and an event (i.e., up, down, move) information.

getActionMasked() returns just an event (i.e., up, down, move) information. Other info is masked out.

For example:

getAction() returns 0x0105.
getActionMasked() will return 0x0005, which is 0x0105 && ACTION_MASK.

    1. The value of ACTION_MASK is 0xFF. It masks the following actions.
      • ACTION_DOWN 0, UP 1, MOVE 2
      • ACTION_POINTER_DOWN 5, UP 6
    2. The value of ACTION_POINTER_ID_MASK is 0xFF00. It masked the pointer ID from following deprecated constants.
      • ACTION_POINTER_1_DOWN 0x0005
      • ACTION_POINTER_2_DOWN 0x0105
      • ACTION_POINTER_3_DOWN 0x0205

相关文章:

  • 2021-08-24
  • 2022-12-23
  • 2021-04-27
  • 2021-09-07
  • 2021-09-23
  • 2021-12-18
  • 2021-12-09
  • 2022-01-07
猜你喜欢
  • 2022-12-23
  • 2021-09-17
  • 2021-12-16
  • 2021-06-03
  • 2021-08-22
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案