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

Wear Compose

  
Write Jetpack Compose applications for Wearable devices by providing functionality to support wearable specific devices, sizes, shapes and navigation gestures.
Latest Update Stable Release Release Candidate Beta Release Alpha Release
September 21, 2022 1.0.2 - - 1.1.0-alpha06

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.1.0-alpha06"

    // For Wear Material Design UX guidelines and specifications
    implementation "androidx.wear.compose:compose-material:1.1.0-alpha06"

    // For integration between Wear Compose and Androidx Navigation libraries
    implementation "androidx.wear.compose:compose-navigation:1.1.0-alpha06"

    // NOTE: DO NOT INCLUDE a dependency on androidx.compose.material:material.
    // androidx.wear.compose:compose-material is designed as a replacement
    // not an addition to androidx.compose.material:material.
    // If there are features from that you feel are missing from
    // androidx.wear.compose:compose-material please raise a bug to let us know.
}

Kotlin

dependencies {
    implementation("androidx.wear.compose:compose-foundation:1.1.0-alpha06")

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

    // For integration between Wear Compose and Androidx Navigation libraries
    implementation("androidx.wear.compose:compose-navigation:1.1.0-alpha06")

    // NOTE: DO NOT INCLUDE a dependency on androidx.compose.material:material.
    // androidx.wear.compose:compose-material is designed as a replacement
    // not an addition to androidx.compose.material:material.
    // If there are features from that you feel are missing from
    // androidx.wear.compose:compose-material please raise a bug to let us know.
}

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.1

Version 1.1.0-alpha06

September 21, 2022

androidx.wear.compose:compose-foundation:1.1.0-alpha06, androidx.wear.compose:compose-material:1.1.0-alpha06, and androidx.wear.compose:compose-navigation:1.1.0-alpha06 are released. Version 1.1.0-alpha06 contains these commits.

New Features

  • We have added Modifier.scrollAway, which scrolls an item vertically in/out of view, based on scroll state (with overloads to work with Column, LazyColumn and ScalingLazyColumn). ScrollAway is typically used to scroll a TimeText out of view as the user starts to scroll a list of items upwards. (I61766)

Bug Fixes

  • The PositionIndicator now is positioned and sized so that it only takes the space needed. This is useful, for example, if semantic information is added to it, talkback now gets the correct bounds of the PositionIndicator on screen. (Ie6106, b/244409133)

Version 1.1.0-alpha05

September 7, 2022

androidx.wear.compose:compose-foundation:1.1.0-alpha05, androidx.wear.compose:compose-material:1.1.0-alpha05, and androidx.wear.compose:compose-navigation:1.1.0-alpha05 are released. Version 1.1.0-alpha05 contains these commits.

Bug Fixes

  • Button roles were added to InlineSlider and Stepper so that Talkback can recognise them as buttons. (Icb46c, b/244260275)
  • We have corrected the z-order of position and page indicators in the Scaffold. The indicators will now sit on top of the vignette and so will not be obscured by the vignette if it is present. (Ib988f, b/244207528)

Version 1.1.0-alpha04

August 24, 2022

androidx.wear.compose:compose-foundation:1.1.0-alpha04, androidx.wear.compose:compose-material:1.1.0-alpha04, and androidx.wear.compose:compose-navigation:1.1.0-alpha04 are released. Version 1.1.0-alpha04 contains these commits.

API Changes

  • We have updated a number of the default colors in the MaterialTheme in order to improve accessibility as the original colors did not have sufficient contrast resulting in difficulties for users to differentiate chip/card/button backgrounds from the theme background color. The updated colors are surface(0xFF202124->0xFF303133), onPrimary(0xFF202124->0xFF303133), onSecondary(0xFF202124->0xFF303133), primaryVariant(0xFF669DF6->0xFF8AB4F8) and onError(0xFF202124->0xFF000000). The changes in colors though relatively subtle may impact existing screenshot tests. (81ab09)

Bug Fixes

  • Fix a logic bug in ScalingLazyColumn that could result in lists with a small (typically exactly 2) number of list items not completing initialization and as a result being transparent. (504347)

Version 1.1.0-alpha03

August 10, 2022

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

New Features

  • We have added a new outlined style for Chips and Buttons and new OutlinedChip and OutlinedButton composables that provide a transparent Chip/Button with a thin border. (Id5972)

API Changes

  • Added overloads for modifying button shapes (Icccde)

Bug Fixes

  • We have corrected the size of the toggle control area of the ToggleChip as it was not matching its UX spec. The UX Spec calls for a 4.dp spacer between the label and a 24x24.dp toggle control icon area giving a total 28.dp width. However the implementation is incorrectly giving 36x24.dp toggle control area. This results in taking away 8.dp of usable text label area. NOTE: This bug fix gives additional space for the text label and as result can (positively) impact the text layout for overflowing text. If you have screenshot tests including ToggleChips they may need to be updated. (I514c8, b/240548670)

Version 1.1.0-alpha02

July 27, 2022

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

New Features

  • We have switched Compose for Wear OS dependencies on core Compose libraries from 1.2.0 to 1.3.0-alpha0X

API Changes

  • Added overloads for modifying chip shapes (I02e87)

Bug Fixes

  • We have animated the visibility of the vignette when showing/hiding Dialog, to be consistent with the existing scaling animation. (Ida33e)
  • We have fixed a bug where a divide-by-zero could occur with some fling behavior when scrolling. (I86cb6)
  • Fixed a bug in the ChipDefaults.childChipColor() to ensure that the disabled background color is fully transparent. (I2b3c3, b/238057342)

Version 1.1.0-alpha01

June 29, 2022

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

API Changes

  • Picker's contentDescription parameter is now used only for the selected Picker option and takes a nullable String (previously, it was necessary to pass a mapping from option to the content description, but only the selected option was used). (Ife6a7)
  • We have made accessibility improvements to Picker so that multi-picker screens are navigable with screen readers and the content description is accessible (I64edb)

Bug Fixes

  • We have updated the baseline profile rules packaged with the Wear Compose library (I9c694)
  • We have corrected the direction of the gradient for Chips in right to left mode. Was top left->bottom right, is now top right->bottom left. (Ic2e77)
  • We have updated the default gradients for Chip/ToggleChip/Card to bring them in line with latest UX spec. ChipDefaults.gradientBackgroundChipColors has been updated to start from 50% of primary rather than 32.5%. CardDefaults.cardBackgroundPainter has been updated to start from 30% of primary and end at 20% of onSurfaceVariant (was previously 20% to 10% onSurfaceVariant). ToggleChip.toggleChipColors changes from a linear gradient of 75% surface to 32.5% primary to 0% surface to 50% primary. (I43bbd)
  • We have added a background color (MaterialTheme.color.surface) behind Chip/ToggleChips that have gradient backgrounds in order to ensure that they are properly visible in the unlikely event that a light color is used behind them. (Ibe1a4, b/235937657)
  • Picker items are now always center-aligned, fixing a bug when setting gradientRatio to zero had the side-effect of changing the alignment. (I712b8)

Version 1.0

Version 1.0.2

September 7, 2022

androidx.wear.compose:compose-foundation:1.0.2, androidx.wear.compose:compose-material:1.0.2, and androidx.wear.compose:compose-navigation:1.0.2 are released. Version 1.0.2 contains these commits.

Bug Fixes

  • We have corrected the z-order of position and page indicators in the Scaffold. The indicators will now sit on top of the vignette and so will not be obscured by the vignette if it is present. (Ib988f, b/244207528)

Version 1.0.1

August 24, 2022

androidx.wear.compose:compose-foundation:1.0.1, androidx.wear.compose:compose-material:1.0.1, and androidx.wear.compose:compose-navigation:1.0.1 are released. Version 1.0.1 contains these commits.

Bug Fixes

  • Fix a logic bug in ScalingLazyColumn that could result in lists with a small (typically exactly 2) number of list items not completing initialization and as a result being transparent. (076c61)

Version 1.0.0

July 27, 2022

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

Major features of 1.0.0

  • This is the first stable release of Compose for Wear OS (read more).
  • Compose for Wear OS builds upon the core Compose libraries providing additional wearable-specific components and, where appropriate, alternate implementations of core Compose components tailored to wearable devices.
  • For a list of the key components in Wear Compose see the release notes for (Compose for Wear OS Beta01).

Bug Fixes

  • We have animated the visibility of the vignette when showing/hiding Dialog, to be consistent with the existing scaling animation. (Ida33e)
  • We have fixed a bug where a divide-by-zero could occur with some fling behavior when scrolling. (I86cb6)
  • Fixed a bug in the ChipDefaults.childChipColor() to ensure that the disabled background color is fully transparent. (I2b3c3, b/238057342)

Version 1.0.0-rc02

June 22, 2022

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

Bug Fixes

  • We have corrected the direction of the gradient for Cards in right to left (RTL) mode. It was top left->bottom right, and it is now top right->bottom left. (Ic2e77)
  • We have updated the default gradients for Chip/ToggleChip/Card to bring them in line with the latest UX spec. ChipDefaults.gradientBackgroundChipColors has been updated to start from 50% of primary rather than 32.5%. CardDefaults.cardBackgroundPainter has been updated to start from 30% of primary and end at 20% of onSurfaceVariant (was previously 20% to 10% onSurfaceVariant). ToggleChip.toggleChipColors changes from a linear gradient of 75% surface to 32.5% primary to 0% surface to 50% primary. (I43bbd)
  • We have added a background color (MaterialTheme.color.surface) behind Chip/ToggleChips that have gradient backgrounds in order to ensure that they are properly visible in the unlikely event that a light color is used behind them. (Ibe1a4, b/235937657)
  • We have updated the baseline profile rules packaged with the Wear Compose library (I9c694)

Version 1.0.0-rc01

June 15, 2022

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

API Changes

  • Interfaces in compose libraries are now built using jdk8 default interface methods (I5bcf1)

Bug Fixes

  • We have removed the explicit call to fillMaxWidth() on list header as it is not needed and can result in problems if a ScalinglazyColumn has a mixture of ListHeader() and Chip() components as the width will tend to grow/shrink as ListHeader items are scrolled in/out of view. (I37144, b/235074035)
  • We have fixed a bug in the ScalingLazyColumn that could result in the list items not drawing correctly until scrolled if the 0th list item was large enough (including padding) (Ic6159, b/234328517)
  • We have made a small adjustment in the ScalingLazyColumn easing as items reach the edge of the screen to match UX spec updates. Old values CubicBezierEasing(0.25f, 0.00f, 0.75f, 1.00f) -> new values CubicBezierEasing(0.3f, 0f, 0.7f, 1f). To keep the old behavior you can override the scalingParams of ScalingLazyColumn (Ie375c)
  • We have added padding to the CompactChip in order to ensure that its tap target size is at least 48.dp high to meet the Material accessibility guidelines. This might impact any layouts you have using CompactChips as they will be taking up additional space. (I3d57c)

Version 1.0.0-beta03

June 1, 2022

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

New Features

  • We have made ScalingLazyColumn work in Compose @Preview mode. (I3b3b6, b/232947354)

API Changes

  • We have changed the default value for the ScalingLazyColumn.horizontalAlignment property from Start to CenterHorizontally to ensure that when list items do not fill the entire width of the column they will be aligned for maximum visibility. To switch back to the previous behavior set horizontalAlignment = Alignment.Start.(I9ed4b)

Known Issues

  • CompactChip’s tap/touch height is smaller than Material accessibility guidelines. This will be corrected in the next release (15th June). If you are using CompactChip this will affect your layouts as CompactChips will now have additional padding above and below. Please adjust and test your layouts or see the bug comments for a workaround to use the existing behavior. (b/234332135)

Bug Fixes

  • New demo to animate adding or removing a start text on a TimeText. (I16d75)
  • Add tests for HorizontalPageIndicator.PagesState (I64ed0)
  • Updating TimeText closer to UX specs (Ib7ea1)

Version 1.0.0-beta02

May 18, 2022

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

New Features

  • Picker now always responds to scroll events even when in read-only mode. This avoids the need for users to first select a Picker by tapping, before they can scroll. In read-only mode, options other than that currently selected are obscured by a shim in gradientColor. (I72925)
  • We have changed the UX behavior of Chip/ToggleChip/CompactChip/SplitToggleChip to stop them from doing fillMaxWidth by default. Instead they will grow to fit their contents. To keep the previous behavior simply add modifier = Modifier.fillMaxWidth()(I60a2c, b/232206371)

Bug Fixes

  • CurvedTextStyle constructor taking a TextStyle now also respects the fontWeight(This may be added to the constructor and copy methods in future revisions of the API) (Ieebb9)
  • Edge swiping improvements. When Modifier.edgeSwipeToDismiss is used and a swipe to the left is triggered from the edge area, it no longer triggers swipe-to-dismiss when swipe direction changes to the right. Previously, it was possible to trigger swipe-to-dismiss by swiping to the left and then swiping to the right.(I916ea)
  • HorizontalPageIndicator now shows up to 6 pages on the screen. If there are more than 6 pages in total, it shows a half-size indicator on the left or right, with a smooth transition between pages.(I2ac29)
  • Improved default snap behavior on ScalingLazyColumn and Picker (I49539)
  • Edge swiping improvements. When Modifier.edgeSwipeToDismiss is used, swipe-to-dismiss only triggers when first touch lands on the edge and swiped to the right, Previously it was possible to trigger swipe-to-dismiss by swiping from any part of the screen if a scroll reaches the start.(I8ca2a)

Version 1.0.0-beta01

May 11, 2022

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

What’s in Compose for Wear OS 1.0

The 1.0.0-beta01 of Compose for Wear OS marks an important milestone as the library is feature complete and the API locked.

Wear Compose Material components in the 1.0 release include:

  • Material Theme - used as a replacement for the Compose for Mobile MaterialTheme, provides the colors, shapes and typography for building components on Wearables that implement the Wear Material Design UX guidelines out of the box.
  • Button, CompactButton and ToggleButton - Button offers a single slot to take an icon, image or short text (3 characters max). Circular in shape with recommended sizes for default, large or small buttons. CompactButton offers a single slot to take any content (icon, image or text) and is circular in shape with background size extra small. CompactButton has optional transparent padding around the background that increases the clickable area. ToggleButton is a button that offers a single slot to take any content (short text, icon or image) and has on/off (checked/unchecked) states with coloring and different icons to show whether checked or not
  • Cards - used to display information about applications such as notifications. Flexible design for different use cases with AppCard and TitleCard giving different layouts and support for images as either card contents or backgrounds.
  • Chips - stadium shaped components similar to buttons, but with a larger area and multiple slots to allow for labels, secondary labels and icons. In different sizes and with support for images as backgrounds.
  • ToggleChips and SplitToggleChips - a Chip with a checked/unchecked state and the addition of a ToggleControl slot to show an icon such as a switch or radio button to show the checked state of the component. In addition, the SplitToggleChip has two tappable areas, one clickable and one toggleable.
  • CircularProgressIndicator - Wear Material progress indicator with two variations. The first expresses the proportion of completion of an ongoing task and supports a gap in the circular track between start and end angles. The second indicates indeterminate progress for an unspecified wait time.
  • curvedText - forms part of the DSL for describing CurvedLayouts, along with curvedRow and curvedColumn, to lay out components around circular devices. See Wear Component Foundation below for more details on CurvedLayout and CurvedModifier (this plays a similar role to Modifiers in the non curved world and allows for configuration of various aspects of layout, padding, gradients, etc).
  • Dialog, Alert and Confirmation - Dialog displays a full-screen dialog, layered over any other content, and supports swipe-to-dismiss. It takes a single slot which is expected to be opinionated Wear Material dialog content such as Alert or Confirmation. Alert is opinionated dialog content with slots for icon, title and message. It has overloads for either two negative and positive buttons shown side-by-side or a slot for one or more vertically stacked chips. Confirmation is opinionated dialog content that displays a message for a given duration. It has a slot for an icon or image (that could be animated).
  • HorizontalPageIndicator - shows horizontal page position in a fashion appropriate to the Wearable form factor. Designed to take the full screen and show a curved indicator on round devices. Can be used with the Accompanist page viewer.
  • Icon - A Wear implementation of Icon which takes color and alpha from the Wear Material Theme. For a clickable icon, see Button or Chip.
  • Picker - displays a scrollable list of items from which to pick. By default, items will be repeated ‘infinitely’ in both directions. Can be displayed in read-only mode to hide unselected options.
  • PositionIndicator - shows scroll position or other positional indication in a fashion appropriate to the Wearable form factor. Designed to take the full screen and shows a curved indicator on round devices.
  • Scaffold - implements the basic Wear Material Design visual layout structure. This component provides an API to put together several Wear Material components (such as TimeText, PositionIndicator and Vignette) constructing the screen, ensuring proper layout strategy for them and collecting necessary data so these components will work together correctly.
  • ScalingLazyColumn - a scrolling scaling/fisheye list component that forms a key part of the Wear Material Design language. Provides scaling and transparency effects to the content items. ScalingLazyColumn is designed to be able to handle potentially large numbers of content items, which are only materialized and composed when needed.
  • Slider - allows users to make a selection from a range of values. The range of selections is shown as a bar, which can optionally be displayed with separators.
  • Stepper - a full-screen component that allows users to make a selection from a range of values, using increase/decrease buttons at the top and bottom of the screen, with a slot in the middle for Text or a Chip.
  • SwipeToDismissBox - handles the swipe-to-dismiss gesture. It takes a single slot for the background (only displayed during the swipe gesture) and the foreground content. Can optionally be combined with the androidx navigation library by using SwipeDismissableNavHost (see Wear Compose Navigation library below).
  • Text - A Wear implementation of the Compose Material Text component, taking color and alpha from the Wear Material Theme
  • TimeText - a component for showing Time and application status at the top of the screen. Adjusts to screen shape by using curved text on round screens.
  • Vignette - a screen treatment for use in the Scaffold that blurs top and bottom of screen when scrollable content is in use.

  • The following components are also included from Wear Compose Foundation:

  • CurvedLayout - Wear Foundation CurvedLayout is a layout composable that places its children in an arc, rotating them as needed. This is similar to a Row layout curved into a segment of an annulus. Note that the content of a CurvedLayout is not a composable lambda - rather, it is a DSL (domain-specific language). All elements in the CurvedLayout’s DSL support an optional modifier parameter, created from CurvedModifier.

  • basicCurvedText - an element in the CurvedLayout DSL, basicCurvedText allows developers to easily write curved text following the curvature of a circle (usually at the edge of a circular screen). basicCurvedText can be only created within the CurvedLayout to ensure the best experience, like being able to specify the positioning, and using CurvedModifiers. Note that in most cases curvedText should be used instead, since it uses Material theming.

  • curvedComposable - wraps normal composable content so that it can be used with CurvedLayout. If curvedComposable has several elements inside, they will be drawn on top of each other (like a Box). To put several composables along a curve, wrap each one with curvedComposable.

  • curvedRow and curvedColumn - similar to Row and Column, curvedRow and curvedColumn can be nested inside a CurvedLayout to lay elements out as needed. For a curvedRow, the angular layout direction and radial alignment may be specified. For a curvedColumn, the angular alignment and radial direction may be specified.

  • CurvedModifier - all curved components accept a modifier parameter that can be created using CurvedModifier: background, size, weight and padding are supported.

  • The following component is also included from Wear Compose Navigation:

  • SwipeDismissableNavHost - provides a place in the Compose hierarchy for self-contained navigation to occur, with backwards navigation provided by a swipe gesture. Content is displayed within a SwipeToDismissBox, showing the current navigation level. During a swipe-to-dismiss gesture, the previous navigation level (if any) is shown in the background.

  • See previous release notes for the various Alpha releases for more details of what has been delivered.

API Changes

  • Added CurvedModifier.padding* functions. These are used to specify additional space to be added around a curved component. (I4dbb4)
  • Removed CompositionLocal internal class (I42490)
  • We have added constant values for Button, CompactButton and ToggleButton icon sizes, as guidance (I57cab)
  • Add enabled parameter to AppCard and TitleCard. Now they have a similar API to androidx.compose.material Cards. When the parameter is set to false, the card will not be clickable. (Idc48d, b/228869805)

Bug Fixes

  • Stepper now disables the decrease and increase buttons when the lower/upper limits have been reached (and applies ContentAlpha.disabled to the iconColor) (I4be9f)
  • We have added 1dp padding around Picker contents when drawn with a gradient to prevent jitter on text seen when swiping. (I0b7b9)
  • Add screenshot tests for PositionIndicator (I5e8bc)
  • Add more tests for AppCard and TitleCard (I85391, b/228869805)

Version 1.0.0-alpha21

April 20, 2022

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

New Features

  • Added new curved modifiers to specify the background of a curved element: CurvedModifier.background, .radialGradientBackground and .angularGradientBackground (I8f392)
  • Allow curved text overflow mode (clip/ellipsis/visible) to be specified. (I8e7aa)
  • Added CurvedModifier.weight modifier, similar to the one in Compose. This can be used on children of curvedRow and CurvedLayout (for width) and children of curvedColumn (for height). (I8abbd)
  • Added CurvedModifier.size, .angularSize and .radialSize modifiers to specify the size of a curved element. (I623c7)

API Changes

  • Reorder parameters to ensure background is before color consistently across the Wear Compose API (I43208)
  • Removed clockwise & insideOut parameters and replaced with more expressive constants on new classes. Curved layout direction can now be LayoutDirection aware, and it is inherited when not specified (If0e6a)
  • We have replaced autoCenter: Boolean with autoCenter: AutoCentringParams in order to fix an API issue with the ScalingLazyColumn. (Ia9c90)
  • We have renamed iconTintColor and toggleControlTintColor to iconColor and toggleControlColor throughout the API (Chip/ToggleChip/Dialog/Slider/Stepper/...) as the color is applied to the icon/toggleControl slot. (Ied238)
  • Rewrite PageIndicatorStyle enum into value class (I2dc72)
  • We have added RowScope/ColumnScope/BoxScope to some of the slots in our Composables to indicate to developers what the layouts assumptions are. This will allow developers to use additional modifiers on some slot content and avoid the need to provide extra layout elements. Additionally we have made some minor updates to the AppCard/TitleCard colors so that timeColor and appColor default to contentColor, these properties can still all be individually overridden if needed. (I26b59)
  • Made SwipeToDismissBoxState.Companion object private (I39e84)
  • Fix parameters order for InlineSlider and Stepper. A simple change to follow api guidelines (I11fec)
  • We have removed the Saver object for SwipeToDismissBoxState as it was not used. (Ifb54e)
  • We have updated CompactChip to bring it inline with the latest UX Specification. Padding has been reduced to horizontal = 12.dp and vertical = 0.dp. The font for label has been changed from button to caption1. The recommended icon sizes are 20x20 when both icon and label are present and 24x24 for an icon only compact chip. For the icon only use case we have also ensured that the icon is center aligned. (Iea2be)
  • We have added a number of new fields to ScalingLazyListLayoutInfo to enable developers to know the amount of contentPadding and autoCenteringPadding that has been applied. These can be useful for developers when calculating fling/scroll (I7577b)
  • We have implemented in/out transitions for Dialog. A showDialog parameter has been added and the Dialog now controls its own visibility (this enables Dialog to run the intro and outro animations when the Dialog is shown/hidden). Note that the outro animation is not performed when the user leaves the dialog via swipe-to-dismiss. We have also added a default value for state in the recently added SwipeToDismissBox overload. (I682a0)
  • In order to better support i18n and a11y we have changed ToggleChip and SplitToggleChip so that they no longer have a default for the toggleControl slot. We have also changed ToggleChipDefaults so that the following methods now return ImageVector rather than Icon (note that as they no longer return @Composables they have changed to start with lower case), SwitchIcon()->switchIcon(), CheckboxIcon->checkboxIcon() and RadioIcon()->radioIcon() - this allows and encourages developers to create their own Icon() composables with an appropriate contentDescription set. (I5bb5b)
  • We have added a SwipeDismissableNavHostState parameter to SwipeDismissableNavHost. This supports use of edge-swiping on screens used as navigation destinations, because SwipeToDismissBoxState can now be hoisted and used to initialize both SwipeDismissableNavHostState and Modifier.edgeSwipeToDismiss on screens that require edge-swiping. (I819f5, b/228336555)

Bug Fixes

  • Ensure curved layouts are updated when needed. (Ie8bfa, b/229079150)
  • Bug fix for https://issuetracker.google.com/issues/226648931 (Ia0a0a, b/226648931)
  • Removed unnecessary experimental annotations (I88d7e)

Version 1.0.0-alpha20

April 6, 2022

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

New Features

  • Add edgeSwipeToDismiss modifier for SwipeToDismiss. Allows swipeToDismiss to be active only on the left edge of the viewport. Used when the center of the screen needs to be able to handle horizontal paging, such as 2-d scrolling a Map or swiping horizontally between pages.(I3fcec, b/200699800)

API Changes

  • Base implementation of CurvedModifiers , this opens the way to introduce ways to customize curved content (but no CurvedModifiers are provided yet, and the ability to create custom modifiers may be available later) (I9b8df)
  • EdgeSwipemodifier documentation and default values update for better understanding .(I6d00d)
  • Add PageIndicator slot into Scaffold. By adding PageIndicator directly into Scaffold we might assure that it will be correctly shown on circular devices. (Ia6042)
  • Remove default Icons from InlineSlider and Stepper parameters. This will help developers to be more attentive to localization and accessibility requirements. Usages of default icons were shown in demos and samples. (I7e6fd)
  • Replace Trailing and Leading parameter names with Start and End in TimeText (Iaac32)
  • We have added a SwipeToDismissBox overload with an onDismissed parameter to support the common usage of triggering a navigation event when the swipe gesture has completed. (I50353, b/226565726)
  • Removed ExperimentalWearMaterialApi annotations from TimeText usage (Ide520)
  • We have marked ScalingLazyList/Column scope and info interfaces as sealed as they are not intended for external developers to implement and this will allow us to add new members in them in future without binary breaking changes. (I7d99f)
  • We have added a new flingBehaviour property to the Picker and a PickerDefaults.flingBehaviour() method to enable configuration of the fling behavior such as adding RSB support. PickerState now implements the ScrollableState interface. (Ib89c7)

Bug Fixes

  • Update the Android Runtime (ART) baseline profile rules for Wear Compose libraries. ART can leverage profile rules on devices in order to compile ahead-of-time a specific subset of the application to improve the performance of the application. Note that this will have no effect on debuggable applications. (Iaa8ef)
  • Improve documentation (I2c051)

Version 1.0.0-alpha19

March 23, 2022

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

API Changes

  • Renamed CurvedRow to CurvedLayout, and reworked to be a scope with a DSL. Using this DSL, more complex curved layouts can be specified using a series of nested curvedRow and curvedColumn (Which are the curved layout equivalents of Row and Column). Inside these layout elements, three elements can be used: curvedComposable (to add any @Composable), basicCurvedText (foundation's curved text) and curvedText (wear material aware curved text). (Ib776a)
  • Make the side for the PositionIndicator configurable. The basic PositionIndicator’s position can now be configured to be End (layout direction-aware), OppositeRsb (takes into account screen rotation, to position itself opposite to the physical RSB), or the absolutes Left & Right. (I2f1f3)
  • For SwipeToDismissBox, we have renamed SwipeDismissTarget.Original to SwipeToDismissValue.Default and SwipeDismissTarget.Dismissal to SwipeToDismissValue.Dismissed. We have also moved SwipeToDismissBoxDefaults.BackgroundKey and SwipeToDismissBoxDefaults.ContentKey to SwipeToDismissKeys.Background, SwipeToDismissKeys.Content respectively. (I47a36)
  • We have added a read-only mode to Picker, for screens with multiple Pickers where only one Picker is editable at a time. When the Picker is read-only, it displays the currently selected option, and a label if one has been provided. (I879de)
  • SwipeToDismissBoxState has been refactored to restrict the scope of ExperimentalWearMaterialApi to Modifier.swipeable and SwipeableState, which are now used internally. SwipeToDismissBoxState now has currentValue, targetValue, isAnimationRunning and snapTo members to support common use cases - please let us know if you require any further properties to be made available. Also fixed the behavior of SwipeableState in the case where the swipe offset is within a rounding error of an anchor. (I58302)

Bug Fixes

  • Simplified and fixed code to detect if the content of a ScalingLazyColumn can be scrolled (used to decide if we display a scrollbar or not) (I7bce0)
  • Fixed a bug on Position Indicator when used with more than one state and switching between them (I320b5)
  • We have updated the default Compose for Wear OS theme typography/fonts to match our latest UX guidance. Of note display1 (40.sp) and display2 (34.sp) are now smaller than their previous values and various other minor updates to line height and line spacing have been made. (Ie3077)
  • We have added resistance to SwipeToDismissBox so that motion only happens when swiping to dismiss and not at all in the opposite direction. (Ifdfb9)
  • We have changed some of the default parameter values for the CircularProgressIndicator functions to bring them in-line with Wear Material Design UX guidance. For the Spinner/Indeterminant version the size (40->24.dp), indicatorColor (primary->onBackground), trackColor transparency (30%->10%) and stroke width (4->3dp) have been updated. For the Progress/Determinate version the trackColor transparency (30%->10%) has been updated. (I659cc)
  • We have updated the default scaling params of the ScalingLazyColumn in-line with the latest Wear Material Design UX specifications. Visually this results in list items starting to be scaled closer to the list center, but being less scaled at the list edge than before. (Ica8f3)
  • Some adjustments to ScalingLazyColumnDefaults.snapFlingBehavior to improve the end of the animation (If3260)

Version 1.0.0-alpha18

March 9, 2022

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

API Changes

  • Several improvements to PositionIndicator: ShowResult renamed PositionIndicatorVisibility. Some performance improvements to avoid recomputations when not needed (Iaed9d)
  • The recommended coloring for the SplitToggleChip has been updated. SplitToggleChip's now have a solid colored background when checked or unchecked with the coloring of the ToggleControl being the primary indication of whether the component is checked or not. We have added a new ToggleDefaults.splitToggleChipColors() to support the new color scheme. We have also simplified the toggleChipColors() methods removing the splitBackgroundOverlayColor (I7e66e)
  • We have added unadjustedSize to the ScalingLazyListItemInfo as it is not safe to calculate the original item size using the scaled size and scaling factor due to float maths precision. (I54657, b/221079441)
  • Add HorizontalPageIndicator. It represents a total number of pages and a selected page. Might be linear or curved, depending on the shape of the device. It also supports custom indicator shape, which defines how each indicator is visually represented. (Iac898)
  • We have updated PickerState so that the numberOfOptions can be updated. This supports use-cases such as a DatePicker, when the number of days in the month changes depending on the month selected. The constructor parameter for PickerState has changed to initialNumberOfOptions accordingly. (Iad066)
  • Hide the PositionIndicator when is a scrollbar and can't scroll. (Id0a7f)
  • For consistency with Scaffold, our full-screen Dialog component now displays a PositionIndicator and a Vignette. We are also now using ScalingLazyColumn instead of Column, which means that the Dialog contents are now in ScalingLazyListScope (and typically need to be enclosed by item { /* content */ }). Dialog supports the verticalArrangement parameter accordingly. (Idea13)
  • We have changed the name of ToggleChip and SplitToggleChip toggleIcon property to toggleControl to better align with Material Design in order to help designers and developers navigate the API. (If5921, b/220129803)
  • We have added a new entry caption3 to the Wear Material Theme Typology.Caption3 is a small font used for the extra long-form writing like legal texts. (I74b13, b/220128356)

Bug Fixes

  • Stop the snapping animation when we are there. (Idb69d)
  • Animate changes in PositionIndicator. (I94cb9)
  • Based on UI/UX feedback we have changed the ScalingLazyColumn autoCentering so that it will provide only enough space to make sure the items with index ScalingLazyListState.initialCenterItemIndex or higher will be able to be fully scrolled to the center of the viewport. This allows developers to place one or two items about the item initially in the center which are not scrollable into the middle. This will mean that an autoCenter'ing ScalingLazyColumn will not be able to scroll above the initialCenterItemIndex/initialCenterItemScrollOffset (I22ee2)
  • We have added a demo for a Date Picker and fixed a bug in PickerState where the initiallySelectedOption was not applied until the Picker had been displayed. (Id0d7e)
  • In order to reduce the clipping of wider ScalingLazyColumn items on circular screens we have increased the default horizontal content padding from 8 to 10 dp. (I0d609)
  • Ensure the PositionIndicator is shown when scrolling. (Ied9a2)

Version 1.0.0-alpha17

February 23, 2022

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

New Features

  • We have added snap support that can be used with ScalingLazyColumn. Set flingBehavior = ScalingLazyColumnDefaults.flingWithSnapBehavior(state) to enable snap support. (I068d3, b/217377069)
  • We have added demos for Picker used to select a time in either 24 hour or 12 hour clock. (Ie5552)

API Changes

  • Fix an issue with TimeText custom fonts & styles on square device (Iea76e)
  • ScalingLazyListLayoutInfo now has reverseLayout, viewportSize and orientation properties matching those from LazyListLayoutInfo (I4f258, b/217917020)
  • ScalingLazyColumn now has a userScrollEnabled property matching that from LazyList (I164d0, b/217912513)
  • Pickers now have a gradient on the top and bottom by default (Iab92a)

Bug Fixes

  • We have modified ScalingLazyColumn so that it no longer greedily fills all of the space in its parent. Instead it will take its size from the size of its contents. This makes it consistent with the behaviour of LazyColumn. If you want to reinstate the old behaviour then pass Modifier.fillMaxWidth()/width()/widthIn() to the ScalingLazyColumn (I51bf8)
  • We have improved the exception message in SwipeDismissableNavHost.kt that was triggered if the navigation backstack was empty. (I1b1dc)

Version 1.0.0-alpha16

February 9, 2022

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

New Features

  • Add CircularProgressIndicator. Progress indicators display the length of a process or an unspecified wait time. Supports a gap (cutout) for TimeText or other components if used full-screen. (Iab8da)

API Changes

  • Pickers now have a flingBehavior parameter, the default value makes them snap to the closest option when scrolling/flinging. (I09000)
  • Additional integer API for InlineSlider and Stepper (I1b5d6)

Bug Fixes

  • We have changed the default initialCenterItemIndex for the ScalingLazyListState from 0->1. This means that unless overridden on state construction with ScalingLazyListState.rememberScalingLazyListState(initialCenterItemIndex =) then the 2nd list item (index == 1) will be placed in the center of the viewport at initialization and the 1st (index == 0) item will be placed before it. This allows for a better default visual effect out of the box as most of the viewport will be filled with list items. (I0c623, b/217344252)
  • We have reduced the ScalingLazyColumn default extraPadding that is provided to ensure that there are plenty of list items to draw (even when we are scaling some of them down in size) from 10% to 5%. This will avoid composing extra list items that might not appear in the viewport. If non standard scalingParams are being used (more extreme scaling for instance) the developer can adjust extra padding using viewportVerticalOffsetResolver. (I76be4)
  • Fix an issue with TimeText on multiple lines on square device (Ibd3fb)
  • We have modified ScalingLazyColumn so that it no longer greedily fills all of the space in its parent. Instead it will take its size from the size of its contents. This makes it consistent with the behavior of LazyColumn. If you want to reinstate the old behavior then pass Modifier.fillMaxSize() to the ScalingLazyColumn - NOTE: This change is incomplete and will be addressed in a follow up change in the next Alpha release. (I3cbfa)

Version 1.0.0-alpha15

January 26, 2022

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

API Changes

  • We have added a new property autoCentering to the ScalingLazyColumn. When true (the default) this will ensure that all items including the first and last can be scrolled so that they are visible in the center of the lists viewport. Note that if using auto-centering you will probably want to set vertical content padding to 0.dp. If both autoCentering and vertical content padding are provided then they will both result in additional space being available before the first and after the last list items allowing them to be scrolled even further. (I2a282, b/214922490)
  • We have added a Dialog component that enables any composable to trigger a full screen dialog that sits on top of other content. When shown, the dialog supports swipe-to-dismiss and will show its parent's content in the background during the swipe gesture. The dialog content is expected to be Alert or Confirmation (renamed from earlier components AlertDialog and ConfirmationDialog) - Alert, Confirmation and Dialog are all in the androidx.wear.compose.material.dialog package. Alert and Confirmation can be used as navigation destinations. Also, added ColumnScope to Alert and Confirmation parameters as necessary. (Ia9014)
  • We have removed onSurfaceVariant2 from the Compose for WearOS Material Theme Colors and replaced uses in the library with onSurfaceVariant. (Icd592)
  • Added a method to programmatically select an option on the PickerState, the initially selected option can now also be specified when creating a PickerState. (I92bdf)
  • We have added support for customizing the fling behavior of the ScalingLazyColumn. (I1ad2e, b/208842968)
  • We have added NavController.currentBackStackEntryAsState() to the Wear.Compose.Navigation library. (If9028, b/212739653)
  • Added Modifier.onRotaryScrollEvent() and Modifier.onPreRotaryScrollEvent() for Wear devices with a rotating side button.(I18bf5, b/210748686)

Version 1.0.0-alpha14

January 12, 2022

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

New Features

  • We have added a number of methods to ScalingLazyListState to allow developer control over scrolling to specific list items and also setting the initial list item and offset.

    As part of this change we have also modified the ScalingLazyList so that it is oriented around the center of the viewport of the ScalingLazyList rather than the start of the viewport.

    A new property anchorType: ScalingLazyListAnchorType = ScalingLazyListAnchorType.ItemCenter has been added to the ScalingLazyList to control whether the center (ScalingLazyListAnchorType.ItemCenter) or Edge (ScalingLazyListAnchorType.ItemStart) should be aligned to the viewport's centerline.

    As a result the ScalingLazyListItemInfo.offset and ScalingLazyListItemInfo.adjustedOffset have changed and will now reflect the offset of the item with respect to both the position of the list item and the anchorType of the list. E.g. for a ScalingLazyColumn with anchorType of ItemCenter and an list item positioned with its center on the centerline of the viewport the offset would be 0.

    The new methods are scrollTo, animatedScrollTo, centerItemIndex, and centerItemOffset. (I61b61)

  • We have added a back button handler to SwipeDismissableNavHost, so that pressing back navigates to the previous level in the navigation hierarchy. (I5b086, b/210205624)

Version 1.0.0-alpha13

December 15, 2021

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

API Changes

  • We have made RangeIcons internal (referenced internally by InlineSlider and Stepper). (I927ec)

Bug Fixes

  • Fixed an issue where SwipeDismissableNavHost would add a destination to the Compose hierarchy before it has reached the CREATED Lifecycle state, resulting in an IllegalStateException. This fix was a prerequisite to updating dependency on navigation-compose to 2.4.0-beta02 and beyond. (I40a2b, b/207328687)

  • Added a Drawables enum class for getting drawable resources within the Wear Compose library, so that reflection is no longer needed. This fixes a bug where library drawables were removed when minifyEnabled=true or shrinkResources=true). (Ib2a98)

  • Added tests for Stepper in Wear Compose (I2d03a)

  • Added samples for SwipeDismissableNavHost in Wear Compose Navigation. (I85f06)

Version 1.0.0-alpha12

December 1, 2021

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

New Features

  • We have added a Stepper component which allows users to make a selection from a range of values. Stepper is a full-screen control with increase and decrease buttons at the top and bottom, and a slot in the middle (expected to take either a Chip or Text). The button icons can be customized if required. (I625fe)

  • We have added 2 new composables for displaying dialogs: AlertDialog waits for a response from the user and displays a title, icon, message and either a) two buttons for simple positive/negative choices or b) vertically stacked chips or toggle chips for more flexible choices, ConfirmationDialog displays an acknowledgement with a timeout. This simple dialog has slots for a title and an (animated) icon. (Ic2cf8)

API Changes

  • Add units (millis) to suggested dialog duration values. (I09b48)

Version 1.0.0-alpha11

November 17, 2021

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

New Features

  • We have added a picker component that lets the user select an item from a scrolling list. By default, the list of selectable items is repeated 'infinitely' in both directions, to give the impression of a rotating cylinder seen from the side. Two features will be added in later releases: snapping to a value after a swipe/fling; adding a function to PickerState to set/scroll to the current value. (I6461b)

API Changes

  • Added a ScalingLazyItemScope and some new modifiers fillParentMaxSize/fillParentMaxWidth/fillParentMaxHeight to allow list items to be sized based on the size of the parent container. Items can be set to fill all or a fraction of the parent’s size. This exposes functionality already available in the LazyRow/Column (I4612f)
  • Added support to ScalingLazyColumn to allow items to have a key. Also added convenience methods to allow adding of items from Arrays and Lists. (Ic1f89)

Bug Fixes

  • Additional examples for TimeText (I8cb64)

Version 1.0.0-alpha10

November 3, 2021

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

New Features

  • Added an InlineSlider for wear compose. InlineSlider allows users to make a selection from a range of values. The range of selections is shown as a bar between the minimum and maximum values of the range, from which users may select a single value. (If0148)

  • Check out the new Compose for WearOS Codelab!

API Changes

  • Macrobenchmark now has a minSdkVersion of 23. (If2655)

Bug Fixes

Version 1.0.0-alpha09

October 27, 2021

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

New Features

  • We have launched the Developer Preview of Compose on Wear OS - see our blog post which reviews the main composables and links to further resources to starting using them.

API Changes

  • We have added support for developers to be able to customize all of the colors in the Wear Material Design Color theme. (I4759b, b/199754668)

Bug Fixes

  • Added SwipeToDismissBox samples that persist state (Ibaffe)
  • Added links to developer.android.com guides from KDocs for CurvedText, TimeText and SwipeToDismissBox. (I399d4)
  • SwipeDismissableNavHost now throws if there's no current destination (indicates that the NavGraph was not built with the wear.compose.navigation.composable utility function) (I91403)
  • Added additional documentation and examples for time source usage in TimeText (I4f6f0)

Version 1.0.0-alpha08

October 13, 2021

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

API Changes

  • We have renamed AppCard and TitleCard body properties to content and moved them to the end of the property list to allow them to be provided as a trailing lambda. Also renamed bodyColor to contentColor for consistency with the new slot names. (I57e78)

Bug Fixes

  • Added links to developer.android.com guides from KDocs for button, card, chip, theme, position indicator and scaling lazy column components. (I22428)
  • Fix WearOS SwipeToDismissBox sometimes not handling swipes. (I9387e)
  • Added samples for Button, CompactButton, Chip, CompactChip, AppCard, TitleCard, ToggleButton, ToggleChip, SplitToggleChip (Iddc15)
  • Added microbenchmark performance tests for Card, Chip, ToggleChip, TimeText and ScalingLazyColumn. (If2fe9)

Version 1.0.0-alpha07

September 29, 2021

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

New Features

  • Added a CurvedText component in material, a component allowing developers to easily write curved text following the curvature of a circle (usually at the edge of a circular screen). (I19593)

API Changes

  • Added tests for TimeText (Idfead)
  • Transform ArcPaddingValues into an interface. (Iecd4c)
  • Added animation to SwipeToDismissBox (I9ad1b)
  • Added hasBackground parameter to the SwipeToDismissBox API so that the swipe gesture can be disabled when there is no background content to display. (I313d8)
  • rememberNavController() now takes a optional set of Navigator instances that will be added to the returned NavController to better support optional Navigators such as those from Accompanist Navigation Material. (I4619e)
  • Reference NamedNavArgument from navigation-common and remove copy from wear.compose.navigation. (I43af6)

Bug Fixes

  • Fixed CurvedRow test flakiness on smaller devices. (If7941)
  • Fixed possible flickering on CurvedRow when the content updates, and ensures the curved row is remeasured (Ie4e06)
  • ChipDefaults.gradientBackgroundChipColors() has been updated in line with UX Spec changes. The gradient now starts with MaterialTheme.colors.primary with alpha 32.5% and ends with MaterialTheme.colors.surface with alpha @ 0% over a background of MaterialTheme.colors.surface @ 75% alpha. (Id1548)
  • We have updated the colors for ToggleChips when in the selected state to match the latest Wear Material Design UX Spec guidance. When selected ToggleChips now have a gradient background from MaterialTheme.color.surface @ 0% alpha, top left, to MaterialTheme.color.primary @ 32% alpha, bottom right, over a background of MaterialTheme.color.surface @ 75% alpha. This results in a more subtle difference between checked and unchecked for the ToggleChip. (Idd40b)

Version 1.0.0-alpha06

September 15, 2021

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

New Features

  • We have added Scaffold a top level application composable that provides a structure for handling PositionIndicators (like Scroll or Volume) position, an area at the top of the screen for displaying the time and application status, and also supports a Vignette to blur the screen top and bottom edge for scrollable content. The main area of the Scaffold is where the application contents are placed. (I5e0bf)
  • Added TimeText implementation for Wear Compose (I5654c)

Wear Compose Navigation Library

  • We have added the first release of the Wear Compose Navigation library, which provides integration between the Wear Compose and Androidx Navigation libraries. It provides a simple means to navigate between @Composable functions as the destinations in your application.

  • This initial release provides:

    • A SwipeDismissableNavHost composable that hosts a navigation graph and provides backwards navigation via swipe gestures
    • NavGraphBuilder.composable extension to assist with constructing navigation graphs
    • rememberSwipeDismissableNavController() to allow hoisting state
  • Example usage where we create two screens and navigate between them:

    val navController = rememberSwipeDismissableNavController()
    SwipeDismissableNavHost(
        navController = navController,
        startDestination = "start"
    ) {
        composable("start") {
            Column(
                horizontalAlignment = Alignment.CenterHorizontally,
                verticalArrangement = Arrangement.Center,
                modifier = Modifier.fillMaxSize(),
            ) {
                Button(onClick = { navController.navigate("next") }) {
                    Text("Go")
                }
            }
        }
        composable("next") {
            Column(
                horizontalAlignment = Alignment.CenterHorizontally,
                verticalArrangement = Arrangement.Center,
                modifier = Modifier.fillMaxSize(),
            ) {
                Text("Swipe to go back")
            }
        }
    }
    
  • Wear Compose Navigation is packaged as a separate library so that simple WearCompose applications that implement their own hand-rolled navigation are not required to depend on the Androidx Navigation library.

API Changes

  • Updated SwipeDismissableNavHost to support rememberSaveable by setting the key identity for background and content (I746fd)
  • We have added a PositionIndicator adapter that can handle LazyListState (I21b88)
  • Updated SwipeToDismissBox to support rememberSaveable (Ie728b)
  • We have added reverseLayout support to the ScalingLazyColumn. This allows for the reversing of the direction of scrolling and layout (I9e2fc)
  • Deprecated performGesture and GestureScope, which have been replaced by performTouchInput and TouchInjectionScope. (Ia5f3f, b/190493367)
  • We have renamed VignetteValue to VignettePosition and renamed VignetteValue.Both renamed to VignettePosition.TopAndBottom. (I57ad7)
  • We have renamed ScalingLazyColumnState to ScalingLazyListState, ScalingLazyColumnItemInfo to ScalingLazyListItemInfo, ScalingLazyColumnLayoutInfo to ScalingLazyListLayoutInfo and ScalingLazyColumnScope to ScalingLazyListScope in case we decide to add a ScalingLazyRow implementation in the future. (I22734)

Bug Fixes

  • Updated CompactChip documentation to describe what happens if neither an icon nor a label is provided. (I4ba88)
  • We have made some adjustments to the Wear card components. (I6b3d0)
    1. TitleCard spacing between Title and Body reduced from 8.dp to 2.dp.
    2. TitleCard header font changed from body to title3.
    3. Card background gradient changed to make the background appear darker.

Version 1.0.0-alpha05

September 1, 2021

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

API Changes

  • Mark ArcPaddingValues as @Stable (I57deb)
  • ScalingLazyColumnState now implements the ScrollableState interface giving developers programmatic access to scroll the component. (I47dbc)

Bug Fixes

  • We have reduced the spacing between Icon and Text in Chip and ToggleChip to bring them in line with updates to the UX Spec. (I83802)

Version 1.0.0-alpha04

August 18, 2021

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

New Features

  • Added a SwipeToDismissBox and swipeable modifier that can be used to support a left-to-right swipe-to-dismiss gesture. Although independent of navigation components, this is expected to be used to exit one screen and navigate to another. Added integration tests to demo swipe-to-dismiss. (I7bbaa)
  • We have added ScalingLazyColumnItemInfo and ScalingLazyColumnLayoutInfo interfaces to ScalingLazyColumnState class to enable developers to know the actual positions and sizes of items in the ScalingLazyColumn after scaling has been applied. We have also fixed a bug with the way that scaling was calculated when 'top' content padding is applied to the ScalingLazyColumn. (I27c07)

API Changes

  • Add CurvedTextStyle class to specify curved text styling Options. Similar to TextStyle, but now only supports color, fontSize and background. More styling options will be added in the future. (I96ac3)
  • We have added ScalingLazyColumnItemInfo and ScalingLazyColumnLayoutInfo interfaces to ScalingLazyColumnState class to enable developers to know the actual positions and sizes of items in the ScalingLazyColumn after scaling has been applied. We have also fixed a bug with the way that scaling was calculated when 'top' content padding is applied to the ScalingLazyColumn. (I27c07)
  • Added @ExperimentalWearMaterialApi to SwipeDismissTarget enum, part of the SwipeToDismissBox API. (I48b5e)

Bug Fixes

  • Added test material for SwipeToDismissBox (I9febc)

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.