A (175)

(Tuis.) #1

576 CHAPTER 15: Developing for Android Wearable Devices


It is important to note that you could have added an android:layout_gravity=“top|left” parameter
as well. Since this is the default setting, aligning objects at 0,0, or at the top left corner, this is
not needed here. Preview the UI design using the GLE tab at the bottom of Eclipse, as shown in
Figure 15-30, and add an android:layout_margin parameter, set to a value of 6 DIP to center the
planet icon in the gap between the clock and the screen corner.


Figure 15-30. Use the Graphical Layout Editor to preview the marsIcon UI element’s placement


Copy and paste the first tag structure underneath itself, as shown in Figure 15-31, to
create your second planet icon UI. Change “mars” to “neptune” in the ID, content,
and source parameters.

Free download pdf