A (175)

(Tuis.) #1

582 CHAPTER 15: Developing for Android Wearable Devices


Now use the Window ➤ Android Virtual Device Manager menu sequence to launch the Neptune
Pine AVD, and use the Start button to access the Launch Options dialog shown in Figure 15-37, on
the left side. Deselect the Scale to Real Size option in order to launch the larger (scaled up) version
of the Neptune Pine AVD, shown in the middle of Figure 15-37. That way, you can see the overall UI
element spacing more clearly, as you fine-tune your margin settings.


Figure 15-37. Uncheck the Scale display to Real Size (left) box and launch the emulator (middle). The scaled display is shown on
the right


It is important to note that the Launch Options dialog is the only way to switch back and forth
between the two different scales (sizes) of the Neptune Pine AVD. If you use the Run As ➤ Android
Application menu sequence, it will use the last setting used in this Launch Options dialog, until you
use the Window ➤ Android Virtual Device Manager ➤ Neptune Pine AVD ➤ Start ➤ Launch Options
dialog sequence to change this setting.


Next, you will add a background space image, so that these planet icons (and planet clock) seem
like they are where they belong—in space! You will use some of the image compositing techniques
that you learned during the book to place a background image into the background image plate of
the parent FrameLayout container object.


Enhancing the App: Adding Background Images


Copy the earthtimebackground PNG8 digital image asset from the book’s files repository into your
EarthTime project /res/drawable-mdpi folder, as shown in Figure 15-38. This image is 320 by 240
to fit the Neptune Pine screen resolution, and since it has a limited range of black, white, and yellow,
I made it a dithered, indexed color PNG8 image, in order to save on the data footprint. This digital
image adds only 58KB to your APK’s file size.

Free download pdf