a. Defining your GUIs with density-independent pixels enables the Android platform to
scale the GUI, based on the pixel density of a given device’s screen.
b. One density-independent pixel is equivalent to one pixel on a 160-dpi screen. On a
240-dpi screen, each density-independent pixel will be scaled by a factor of 160/240
(i.e., 0.67). So, a component that’s 100 density-independent pixels wide will be scaled
to 67 actual pixels wide.
c. On a screen with 120 dpi, each density-independent pixel is scaled by a factor of
120/160 (i.e., 0.75). So, the same component that’s 100 density-independent pixels wide
will be 75 actual pixels wide.
d. Scale-independent pixels are scaled like density-independent pixels, and they”re also
scaled by the user’s preferred font size (as specified in the device’s settings).
Throughout its life, an Activity can be in one of several statesactive (i.e., running),
paused or stopped. The Activity transitions between these states in response to various
events. Which of the following statements is false?
a. An active Activity is visible on the screen and “has the focus”that is, it’s in the
foreground. This is the Activity the user is interacting with.
b. A paused Activity is visible on the screen but does not have the focussuch as when an
alert dialog is displayed.
c. A stopped activity is not visible on the screen and is likely to be killed by the system
when its memory is needed. An Activity is stopped when another Activity becomes
active.