Book Image

Android Wearable Programming

By : Steven F. Daniel
Book Image

Android Wearable Programming

By: Steven F. Daniel

Overview of this book

Table of Contents (14 chapters)
Android Wearable Programming
Credits
About the Authors
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a UI for the mobile activity


In this section, we need to build the UI for the Android handheld activity section of our application. This will enable us to communicate and send messages and images between the Android wearable and the Android handheld device.

To create the user interface for the mobile activity, follow these simple steps:

  1. From the Project Navigator window, choose the mobile section and open the activity_mobile.xml file that is located in the res | layout folder, and add the following highlighted code:

    <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:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
        android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MobileActivity">
    
        <EditText...