Motion events describe movements in terms of an action code and a set of axis values.The action code specifies the state change that occurred such as a pointer going down or up.
Each pointer has a unique id that is assigned when it first goes down (indicated by ACTION_DOWN
or ACTION_POINTER_DOWN
). A pointer id remains valid until the pointer eventually goes up (indicated by ACTION_UP
or ACTION_POINTER_UP
) or when the gesture is canceled (indicated by ACTION_CANCEL
).
the pointer index of a pointer can change from one event to the next but the pointer id of a pointer is guaranteed to remain constant as long as the pointer remains active.