A (175)

(Tuis.) #1
CHAPTER 15: Developing for Android Wearable Devices 575

Figure 15-28. Add a line of space under the tag and use a left chevron < to open the tag selector


Figure 15-29. Configure an tag named marsIcon with a marsClock and marsbutton image


Name the ImageView marsIcon using the android:id parameter. Add an
android:contentDescription parameter, as required by all ImageView classes and subclasses,
referencing marsClock. Add the required android:layout_width and android:layout_height
parameters, set to a wrap_content constant.


Finally, add an android:src parameter referencing the marsbutton source PNG32 image that you
copied over. The XML mark-up for this first child tag should look like the following, as
seen in Figure 15-29:


<ImageView android:id="@+id/marsIcon" android:contentDescription="@string/marsClock"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:src="@drawable/marsbutton" />

Free download pdf