Reputation: 255
I'm reading the book "Beginning Android Games" and the code won't compile.
All of these constants are not found in the MotionEvent class:
MotionEvent.ACTION_MASK
MotionEvent.ACTION_POINTER_DOWN
MotionEvent.ACTION_POINTER_UP
And these methods:
event.getX(pointerIndex)
event.getPointerCount()
event.getX(pointerIndex)
Upvotes: 2
Views: 399
Reputation: 38168
Which API level do you use for your android project ?
It should be at least 2.0 (level 5). For every android method or constant, look at the docs. On the gray banner for the name of this field, on the right, there is a version number that indicates the level of Android API that introduced this feature.
Regards, Stéphane
Upvotes: 1