Exercises
7.3 Fill in the blanks in each of the following statements:
a) Most Android devices have a(n) __________ that allows apps to detect movement.
b) Override Fragment
method __________ to respond to the event when a Fragment
is attached to a parent Activity
.
c) The __________ monitors the accelerometer to detect device movement.
d) SensorManager
’s __________ constant represents the acceleration due to gravity on earth.
e) You register to receive accelerometer events using SensorManager
’s registerListener
method, which receives three arguments: the SensorEventListener
object that will respond to the events, a Sensor
representing the type of sensor data the app wishes to receive and __________.
f) You pass true
to Paint
’s __________ method ...
Get Android™ How to Program, Second Edition 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.