Answers to Self-Review Exercises
a) SensorEventListener.
b) curves.
c) dragged across the screen.
d) unregisterListener.
e) onSensorChanged.
f) onAttach.
g) onDraw.
h) getActionMasked.
i) immersive mode.
a) False. You unregister the accelerometer event handler when the app is sent to the background.
b) False. Call the inherited View method invalidate to indicate that the View needs to be redrawn.
c) False. If the action is MotionEvent.ACTION_DOWN or MotionEvent.ACTION_POINTER_DOWN, the user touched the screen with a new finger.
d) False. Resetting the Path does not erase its corresponding painted line from the screen, because those lines have already been drawn to the bitmap that’s displayed to the screen.
e) False. The method MediaStore.Images.Media.insertImage ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access