I m referring to some websites like http://developer.android.com/reference/android/view/MotionEvent.html http://www.vogella.com/tutorials/AndroidTouch/article.html to learn MotionEvent for designing User Interface. The problem is i am getting confused with terminologies like pointerIndex,Id ,getActionIndex, getActionMasked and other important methods related to MotionEvent.
Pointer index tells us which pointer in the current set of pointers the event is for
Pointer ID is a unique ID assigned to every pointer
The pointer index of a pointer may change, but its ID will remain the same. This is best explained with an example.
Say you have a pointer on the screen, and then touch the screen with a second pointer. Each of these pointers will have their ids and indices. Say you now remove the first pointer.
Alas! The secondary pointer now becomes the primary pointer! So its index will be changed to that of the previous pointer that was just removed i.e. its index has changed from 1 to 0. But its id will remain the same.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With