Answers to Self-Review Exercises
-
SensorEventListener
.curves.
dragged across the screen.
unregisterListener
.onSensorChanged
.onAttach
.onDraw
.getActionMasked
.
-
False. You unregister the accelerometer event handler when the app is sent to the background.
False. Call the inherited
View
methodinvalidate
to indicate that theView
needs to be redrawn.False. If the action is
MotionEvent.ACTION_DOWN
orMotionEvent.ACTION_POINTER_DOWN
, the user touched the screen with a new finger.False. Resetting the
Path
does not erase its corresponding painted line from the screen, because those lines have already been drawn to thebitmap
that’s displayed to the screen.False. The method
MediaStore.Images.Media.insertImage
saves aBitmap
into the ...
Get Android How to Program, 3/e now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.