Skip to content

Most visited

Recently visited


Creating Custom Layouts

Creating layouts for a watch is similar to creating them for a phone, except that you have to design for the screen size and for glanceability. Do not port the functionality and UI from a phone app to a watch and expect a good experience.

You should create custom layouts only when necessary. Read the design guidelines for information on designing great watch apps.

Create Custom Notifications

In general, you should create notifications on the phone and let them automatically sync to the wearable. This lets you build your notifications once and have them appear on many types of devices (not just watches, but eventually Auto and TV) without having to design them for different form factors.

If the standard notification styles don't work for you (such as NotificationCompat.BigTextStyle or NotificationCompat.InboxStyle), you can display an activity with a custom layout. You can only create and issue custom notifications on the watch, and the system does not sync these notifications to the phone.

Note: When creating custom notifications on the watch, you can use the standard notification APIs (API Level 20) instead of the Support Library.

To create a custom notification:

  1. Create a layout and set it as the content view for the activity that you want to display.
    public void onCreate(Bundle bundle){
  2. Define necessary properties for the activity in the Android manifest to allow the activity to be displayed in the watch's context stream process. You need to declare the activity to be exportable, be embeddable, and have an empty task affinity. We also recommend setting the theme to Theme.DeviceDefault.Light. For example:
    <activity android:name="com.example.MyDisplayActivity"
        android:theme="@android:style/Theme.DeviceDefault.Light" />
  3. Create a PendingIntent for the activity that you want to display. For example:
    Intent notificationIntent = new Intent(this, NotificationActivity.class);
    PendingIntent notificationPendingIntent = PendingIntent.getActivity(
            this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
  4. Build a Notification and call setDisplayIntent() providing the PendingIntent. The system uses this PendingIntent to launch the activity when users view your notification.
  5. Issue the notification using the notify() method.

    Note:In Wear 1.x, when a notification is peeking on the homescreen, the system displays it with a standard template that it generates from the notification's semantic data. This template works well on all watchfaces. When users swipe the notification up, they'll then see the custom activity for the notification.

Create Layouts with the Wearable UI Library

The Wearable UI Library is automatically included when you create your watch app with the Android Studio Project Wizard. You can also add this library to your build.gradle file with the following dependency declaration:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile ''
    compile ''

This library helps you build UIs that are designed for watches. For more information, see Creating Custom UIs for Wear Devices.

Here are some of the major classes in the Wearable UI Library:

A FrameLayout object that's aware of screen shape and can box its children in the center square of a round screen.
A fragment that presents content within an expandable, vertically scrollable card.
An image view surrounded by a circle.
An activity that displays confirmation animations after the user completes an action.
A drawable that contains two child drawables and provides methods to directly adjust the blend between the two.
A view that provides a circular countdown timer, typically used to automatically confirm an operation after a short delay has elapsed.
A layout manager that allows the user to navigate both vertically and horizontally through pages of data. You supply an implementation of a GridPagerAdapter instance to generate the pages that the view shows.
An adapter that supplies pages to a GridViewPager object.
An implementation of a GridPagerAdapter instance that represents each page as a fragment.
A page indicator for a GridViewPager implementation that identifies the current page in relation to all available pages on the current row.
Wearable specific implementation of the RecyclerView class for displaying scrollable lists of items in square and round devices.

Wear UI library API reference

The reference documentation explains how to use each UI widget in detail. Browse the Wear API reference documentation for the classes above.

Note: We recommend using Android Studio for Android Wear development, as it provides project setup, library inclusion, and packaging conveniences.

This site uses cookies to store your preferences for site-specific language and display options.


This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.