Wear Compose

  
Write Jetpack Compose applications for Wearable devices by providing functionality to support wearable specific devices, sizes, shapes and navigation gestures.
Latest Update Current Stable Release Next Release Candidate Beta Release Alpha Release
August 4, 2021 - - - 1.0.0-alpha03

Declaring dependencies

To add a dependency on Wear, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

Groovy

dependencies {
    implementation "androidx.wear.compose:compose-foundation:1.0.0-alpha03"

    // For Wear Material Design UX guidelines and specifications
    implementation "androidx.wear.compose:compose-material:1.0.0-alpha03"
}

Kotlin

dependencies {
    implementation("androidx.wear.compose:compose-foundation:1.0.0-alpha03")

    // For Wear Material Design UX guidelines and specifications
    implementation("androidx.wear.compose:compose-material:1.0.0-alpha03")
}

For more information about dependencies, see Add build dependencies.

Feedback

Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.

Create a new issue

See the Issue Tracker documentation for more information.

Version 1.0.0

Version 1.0.0-alpha03

August 4, 2021

androidx.wear.compose:compose-foundation:1.0.0-alpha03 and androidx.wear.compose:compose-material:1.0.0-alpha03 are released. Version 1.0.0-alpha03 contains these commits.

API Changes

  • Added CurvedText component, that allows developers to easily write text following the curvature a circle (usually at the edge of a circular screen) (Id1267)
  • We have renamed CardDefaults.imageBackgroundPainter() to CardDefaults.imageWithScrimBackgroundPainter() to make it clear that the background image with have a scrim drawn over it. (I53206)
  • Adding ScalingLazyColumn component that provides a list component for Wear Material that gives a fisheye view with the list contents scaling down in size and becoming transparent as they scale towards the edge of the component. (I7070c)

Bug Fixes

  • We changed the default color of the appName content in AppCard in response to a UX Spec update. The default color for the appName is now MaterialTheme.colors.onSurfaceVariant. Additionally added a missing parameter doc description for the title slot. (Ic4ad1)

Version 1.0.0-alpha02

July 21, 2021

androidx.wear.compose:compose-foundation:1.0.0-alpha02 and androidx.wear.compose:compose-material:1.0.0-alpha02 are released. Version 1.0.0-alpha02 contains these commits.

New Features

  • Added a new class CurvedRow to laid out composables in an arc (I29941)
  • Added a new type of card for use in applications (TitleCard), also add support for having images as the background to Cards to emphasize their contents (I53b0f)

API Changes

  • Add support for radial alignment to CurvedRow (similar to the vertical alignment in a row) (Id9de5)
  • Add a new class CurvedRow to laid out composables in an arc (I29941)
  • Added a new type of card for use in applications (TitleCard), also add support for having images as the background to Cards to emphasize their contents (I53b0f)
  • Added toggle icons (checkbox, switch and radio buttons) to ToggleChipDefaults to make it easier for developers to configure ToggleChip and SplitToggleChips (I7b639)
  • The start and end content padding for Chips has been updated so that it is consistently 14.dp regardless of whether the Chip has an icon present or not (was previously 12.dp if icon present and 14.dp if not) (I34c86)

Bug Fixes

  • Add tests for CurvedRow (I93cdb)
  • Tying Wear Compose dependencies to Compose 1.0.0-rc01. (Ie6bc9)
  • Changed the handing of background image painting in Cards and Chips so that the image is Cropped rather than being stretched in order to maintain image proportions. (I29b41)
  • Added more demos and integration tests for Button and ToggleButton. (5e27ed2)
  • Added more Chip tests to cover the content colors for imageBackgroundChips (Ia9183)

Version 1.0.0-alpha01

July 1, 2021

androidx.wear.compose:compose-foundation:1.0.0-alpha01 and androidx.wear.compose:compose-material:1.0.0-alpha01 are released. Version 1.0.0-alpha01 contains these commits.

New Features

Wear Compose is a Kotlin, Compose-based library that supports Wear Material design, an extension of Material Design for WearOS wearables. This first alpha release contains early, functional implementations of the following:

  • Material theme - configures the colors, typography and shapes consistently across the components used from this library.
  • Chip, CompactChip - chips are stadium shaped and variations are available to take icon, label and secondary label content.
  • - ToggleChip, SplitToggleChip - a specialized type of chip that includes a slot for a bi-state toggle icon such as a radio button or checkbox. In addition, the SplitToggleChip has two tappable areas, one clickable and one toggleable.
  • Button, CompactButton - buttons are circular in shape, with a single content slot for an icon or minimal text (maximum 3 characters).
  • ToggleButton - a button that turns an action on or off, with a single slot for icon or minimal text (maximum 3 characters).
  • Card, AppCard - rectangular shaped with rounded corners, offering slots for content such as app icon, time, title and body.

Future releases will extend the Widget set adding support for Wear Material Design pickers, sliders, lists, page indicators, dialogs, scroll rsb indicators, toasts and more.

Additionally support will be provided for other Wearable Specific features such as curved layouts and text, as well as scaffolding to make it easy for developers to build Wearable apps/overlays.

Wear Compose Material is designed with the same principles as Compose Material, although being targeted at wearables. The Wear Compose Material library should be used in place of the Compose Material library when building for a Wearable device.

The two “Material” libraries should be considered mutually exclusive and should not be mixed in the same app. If developers find themselves including the Compose Material library in their dependencies it would suggest that either a) there are components missing from the Wear Compose Material library, please let us know what you need, or b) are using a component that we do not recommend for use on a Wearable Device.