I am confused by the two methods in Android. It seems that both methods tell you what kind of event it is, i.e., whether it is a down or up event.
When will I use which?
public void onTouchEvent(MotionEvent e)
Don't quote the documentation please, because I read it, and I don't see any parameter I can supply to either of the methods to get something different.
public final int getAction ()
and
public final int getActionMasked()
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.