Exercises
-
5.3 Fill in the blanks in each of the following statements:
Most Android devices have a(n) that allows apps to detect movement.
Override
Fragment
method to respond to the event when aFragment
is removed from a parentActivity
.The monitors the accelerometer to detect device movement.
SensorManager
’s constant represents the acceleration due to gravity on earth.You register to receive accelerometer events with
SensorManager
methodregisterListener
, which receives: theSensorEventListener
that responds to the events, aSensor
representing the type of sensor data the app wishes to receive and .You pass
true
toPaint
’s method to enable anti-aliasing ...
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.