Build View-based UIs on Wear OS

Stay organized with collections Save and categorize content based on your preferences.

Android Jetpack enables consistent, optimized user interfaces across devices and platform apps. Android Jetpack includes the Wear OS UI Library, which contains many of the preferred UI components for your Wear OS apps.

The Wear OS UI Library includes (but is not limited to) the following classes:

For a full list, read the release notes.

Add a dependency on the Wear OS UI Library

To start creating overlays for your app, create a Wear-OS-specific project. Then add the following dependencies to your app's build.gradle file:

dependencies {
  // Standard Wear OS libraries
  implementation "androidx.wear:wear:1.2.0"
  // includes support for wearable specific inputs
  implementation "androidx.wear:wear-input:1.1.0"

Import classes from the Wear OS UI Library package

When you use a class from the Wear OS UI Library, import that class from the androidx.wear.widget package. See the Example of Using a Library Class.

Use the right element names in layout files

In layout files, use fully qualified names that correspond to the Wear OS UI Library.

For example, to use the DismissibleFrameLayout class from the Wear OS UI Library, you could specify the following in a layout file:

    android:id="@+id/swipe_dismiss_root" >

        android:text="Swipe the screen to dismiss me." />