User interfaces for watch apps differ significantly from user interfaces for phone apps. Watch apps should follow the guidelines on the Wear OS by Google design site and implement the UI patterns on that site, which ensure the following:
- A consistent user experience across apps
- An experience that is optimized for watches
This lesson provides information about creating attractive, custom UIs, including custom notifications for your watch apps.
Note: We recommend using Android Studio for Wear OS development, as it provides project setup, library inclusion, and packaging conveniences. This training assumes you are using Android Studio.
The Wearable Support Library, which is in the Google Repository in the Android SDK, provides classes that help you implement UI patterns and create layouts that work on round and square Wear OS devices.
Note that the following classes in the Wear support library are deprecated in Wear 2.0:
- ActionChooserView. Use the AlertDialog class instead.
- CrossfadeDrawable. Use the AnimationSet class instead.
- DismissOverlayView. Long pressing to dismiss an app is no longer suggested for immersive activities (such as Google Maps).
- GridViewPager. To implement a vertical paging pattern, consider using the PagerSnapHelper and a RecyclerView instead.
- ProgressSpinner. Use the ProgressBar class instead.
- WatchViewStub and WearableFrameLayout. Provide alternative resources for specific device configurations as described in the Providing Resources guide.
-
WearableListView. Use the following classes
instead:
- For centering and snapping your list items, use the
WearableRecyclerView
class supported by aSnapHelper
or aLinearSnapHelper
class. - For scaling and otherwise modifying the list items based on
their location on the screen, use the
WearableLinearLayoutManager.LayoutCallback
class.
- For centering and snapping your list items, use the
- Define layouts
- Learn how to create layouts that look good on round and square Wear OS devices.
- Create lists
- Learn how to create lists that are optimized for wearable devices.
- Show confirmations
- Learn how to display confirmation animations when users complete actions.
- Exit full-screen activities
- Learn how to implement the long-press-to-dismiss UI pattern to exit full-screen activities.
- Use the Wear UI Library
- Learn how to use the Wear UI Library in your user interfaces.
- Wear navigation and actions
- Learn how to add interactive drawers to your Wear app.
- Multi-function buttons
- Learn how to retrieve available multi-function buttons on a device.
- Rotary input
- Learn how to add rotary input support to your app's scrollable views.
- Creating input method editors
- Learn how to support input methods beyond voice.
- Using wrist gestures
- Learn how to enable user interaction with wrist gestures.