comprehensive Study guide
MotionEvents of which action type need a coded response to draw a rectangle of
appropriate dimensions by drag-drawing on a "canvas"?
Select one:
a. Only ACTION_UP
b. Only ACTION_MOVE and ACTION_UP
c. Only ACTION_DOWN
d. ACTION_DOWN, ACTION_MOVE and ACTION_UP
e. Only ACTION_DOWN and ACTION_MOVE
f. Only ACTION_MOVE
g. Only ACTION_DOWN and ACTION_UP - ANSW g
The methods getX() and getY() return the absolute coordinates of the current event.
The data type of their return is:
Select one:
a. MotionEvent
b. integer
c. LatLng
d. double
e. float - ANSW e
What should the callback method onTouch() return to report handling the event?
Select one:
a. true
b. false - ANSW a
MotionEvents of which action type can utilise batching?
Select one:
a. ACTION_DOWN
b. ACTION_UP
c. ACTION_MOVE - ANSW c
What should you do to catch incoming touch events on a nested layout?
, Select one:
a. Overriding the onTouchEvent() method in the activity's controller.
b. Registering onTouchListerner on the nested layout
c. Registering onTouchListerner on the activity's layout - ANSW b
f you want to draw a freehand line by drag-drawing on a "canvas", which MotionEvent
should you implement?
Note: A freehand line is simply a line drawn without a straightedge.
Select one:
a. Only ACTION_UP
b. Only ACTION_MOVE
c. Only ACTION_DOWN
d. Only ACTION_DOWN and ACTION_UP - ANSW b
For each gesture, you will only get one ACTION_MOVE event at most.
Select one:
a. true
b. false - ANSW b
Which motion event does a gesture start with?
Select one:
a. ACTION_UP
b. ACTION_MOVE
c. ACTION_DOWN - ANSW c
Which of the following is not a possible return value from a MotionEvent's
getActionMasked method?
Select one:
a. ACTION_SKIP
b. ACTION_UP
c. ACTION_DOWN
d. ACTION_MOVE - ANSW a
The data type of the input parameter to onTouchEvent() callback is:
Select one:
a. LatLng
b. MotionEvent
c. Event
d. View - ANSW b
Which of the following is false?