Creating a UI for the wear activity
In this section, we need to build the user interface for the Android wearable activity section of our application. This will enable us to receive messages and images sent from the Android handheld device and have this information presented within the Android wearable watch area.
Perform the following steps:
From the Project Navigator window, open the
rect_activity_wear.xml
file that is located in theres
|layout
folder, and add the following code:<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context=".WearActivity" tools:deviceIds="wear_square"> <TextView android:layout_width="92dp" android:layout_height="31dp" android:minEms="10" android:id...