Skip to content

2022-05-10

Choose a tag to compare

@github-actions github-actions released this 11 May 18:48
· 215 commits to main since this release

Activity: v1.5.0-rc01

May 11, 2022

androidx.activity:activity:1.5.0-rc01, androidx.activity:activity-compose:1.5.0-rc01, and androidx.activity:activity-ktx:1.5.0-rc01 are released with no changes from 1.5.0-beta01. Version 1.5.0-rc01 contains these commits.

Benchmark: v1.1.0-rc02

May 11, 2022

androidx.benchmark:benchmark-*:1.1.0-rc02 is released. Version 1.1.0-rc02 contains these commits.

  • Note that this release includes a behavior change, as apps are now fully reinstalled in between each benchmark to ensure accurate measurements.

Bug Fixes/Behavior Changes

  • Fixed an issue where app compilation was not correctly reset between macrobenchmarks, and not reset at all on unrooted builds. This fixes many cases where running multiple tests would result in CompilationMode having little to no effect on measurements. To workaround this problem, the target app is now fully reinstalling each test method, which will clear application data between each macrobenchmark. (I31c74, b/230665435)

  • As this prevents apps from setting up state before tests, it is now possible to skip compilation / reinstallation to enable working around this. You can for example fully compile the target with a shell command cmd package compile -f -m speed <package>, and then bypass macrobenchmark's compilation step.

    E.g. in Your macrobenchmark's build.gradle:

    android {
        defaultConfig {
            testInstrumentationRunnerArgument 'androidx.benchmark.compilation.enable, 'false'
        }
    }
    

    Or from the Gradle command line:

    ./gradlew macrobenchmark:cC -P android.testInstrumentationRunnerArguments.androidx.benchmark.compilation.enable=false
    
  • Made it possible to share a module between macrobenchmarks and baseline profile generating tests by adding androidx.benchmark.enabledRules instrumentation argument. Pass in 'Macrobenchmark', or 'BaselineProfile' to just run one type of test, e.g. when generating BaselineProfiles on an emulator. (I756b7, b/230371561)

    E.g. in Your macrobenchmark's build.gradle:

    android {
        defaultConfig {
            testInstrumentationRunnerArgument 'androidx.benchmark.enabledRules', 'BaselineProfile'
        }
    }
    

    Or from the Gradle command line:

    ./gradlew macrobenchmark:cC -P android.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
    

Camera-Camera2, Camera-Core, Camera-Lifecycle, & Camera-Video: v1.1.0-rc01

May 11, 2022

androidx.camera:camera-*:1.1.0-rc01 is released. Version 1.1.0-rc01 contains these commits.

New Features

  • Release the first RC version for camera-video, camera-view, and camera-extension

Bug Fixes

  • Fixed an issue where the video codec wasn't released when VideoCapture<Recorder> was unbound, causing subsequent uses of VideoCapture<Recorder> to fail on recording with MediaCodec.CodecException, especially on API 21-22 devices. (Ie7f68)
  • Fix captured images of CameraExtensionsActivity do not be deleted in ImageCaptureTest

Compose Animation: v1.2.0-beta01

May 11, 2022

androidx.compose.animation:animation:1.2.0-beta01, androidx.compose.animation:animation-core:1.2.0-beta01, and androidx.compose.animation:animation-graphics:1.2.0-beta01 are released. Version 1.2.0-beta01 contains these commits.

  • This is the first beta release of 1.2! There are no changes since the last alpha.

Compose Compiler: v1.2.0-beta01

May 11, 2022

androidx.compose.compiler:compiler:1.2.0-beta01 is released. Version 1.2.0-beta01 contains these commits.

  • This is the first beta release of 1.2! There are no changes since the last alpha.

New Features

  • Added support for Kotlin 1.6.21

Compose Foundation: v1.2.0-beta01

May 11, 2022

androidx.compose.foundation:foundation:1.2.0-beta01 and androidx.compose.foundation:foundation-layout:1.2.0-beta01 are released. Version 1.2.0-beta01 contains these commits.

New Features

  • This is the first beta release of 1.2!

API Changes

  • Added experimental BeyondBoundsInterval that can be used by custom implementations of LazyList when they layout items beyond visible bounds (Ifabfb, b/184670295)
  • LineHeightBehavior is renamed as LineHeightStyle
  • LineVerticalAlignment is renamed as LineHeightStyle.Alignment
  • Renames LineHeightTrim is renamed as LineHeightStyle.Trim
  • Default constructor values from LineHeightStyle is removed (I582bf, b/181155707)
  • Added default values for the optional members of LazyLayoutItemProvider interface. (Iba8a0)
  • In the LazyLayoutItemProvider api instead of a factory returning the composable lambda by index we now have a simpler composable function Item accepting the index. (Id2196)
  • LazyLayoutItemsProvider is renamed to LazyLayoutItemProvider (I0638c)
  • LazyLayoutItemsProvider.itemsCount is renamed to itemCount (Id409c)
  • Added Brush to TextStyle and SpanStyle to provide a way to draw text with gradient coloring. (I53869, b/187839528)
  • trimFirstLineTop, trimLastLineBottom attributes of LineHeightBehavior changed into a single enum: LineHeightTrim. LineHeightTrim have values of 4 states defined by two booleans: FirstLineTop, LastLineBottom, Both and None (Ifc6a5, b/181155707)
  • Added LineHeightBehavior to the TextStyle and ParagraphStyle. LineHeightBehavior controls whether line height is applied to the top of the first line and to the bottom of the last line. It also defines the alignment of line in the space provided by TextStyle(lineHeight).

    For example it is possible to get a behavior similar to what CSS defines via LineHeightBehavior(alignment = LineVerticalAlignment.Center, trimFirstLineTop=false, trimLastLineBottom = false).

  • trimFirstLineTop, trimLastLineBottom configurations works correctly only when includeFontPadding is false. (I97332, b/181155707)

  • Added experimental imeNestedScroll() modifier so that developers can control the IME through scrolling. (I60759)

Bug Fixes

  • Fixed regression where text fields would not hide the keyboard when removed from the composition while focused. (I7a410, b/230536793, b/225541817)
  • Support ellipsis when height is limited and doesn't fit all text lines (Ie528c, b/168720622)
  • BringIntoViewRequester.bringIntoView will now always suspend until the request is either completed or was interrupted by a newer, non-overlapping request. Overlapping requests will be queued. (I43e7f, b/216790855)
  • Concurrent BringIntoViewRequester.bringIntoView calls for rectangles that are completely overlapping will now only honor the larger rectangle's request. (I34be7, b/216790855, b/184760918)
  • Turned on default includeFontPadding. It is possible to turn off the includeFontPadding using TextStyle.platformTextStyle attribute. In the near future we will change the default behavior however until that time this allows us to better integrate line height improvements (aosp/2058653) and solve TextField clipping issues. (I01423, b/171394808)
  • Modifier.bringIntoViewRequester no longer uses onGloballyPositioned. (I630f5)

External Contribution

  • MouseInjectionScope.scroll(delta = someDelta) is now inverted on Android if we scroll vertically (if someDelta is positive, it will scroll downward) (Ifb697, b/224992993)

Compose Material: v1.2.0-beta01

May 11, 2022

androidx.compose.material:material-*:1.2.0-beta01 is released. Version 1.2.0-beta01 contains these commits.

New Features

  • This is the first beta release of 1.2!

API Changes

  • Renamed TextFieldDefaults.BorderStroke composable that draws a border stroke in OutlinedTextField to TextFieldDefaults.BorderBox. (I5f295)

Compose Material 3: v1.0.0-alpha11

May 11, 2022

androidx.compose.material3:material3:1.0.0-alpha11 and androidx.compose.material3:material3-window-size-class:1.0.0-alpha11 are released. Version 1.0.0-alpha11 contains these commits.

New Features

  • Added RangeSlider to Material 3 (I18e38)
  • Adds Material3 AssistChip and InputChip support (I0d25a)
  • Adds Material3 FilterChip and SuggestionChip support (I9fdf3)

API Changes

  • Renamed TextFieldDefaults.BorderStroke composable that draws a border stroke in OutlinedTextField to TextFieldDefaults.BorderBox. (I5f295)
  • Switch m3 visual changes (Iab30e)
  • Allow passing colors to the standard icon buttons. (Ia2445)

Bug Fixes

  • Add lint check to material3/Scaffold to ensure that the inner padding is used (I72293, b/226951418)

Compose Runtime: v1.2.0-beta01

May 11, 2022

androidx.compose.runtime:runtime-*:1.2.0-beta01 is released. Version 1.2.0-beta01 contains these commits.

New Features

  • This is the first beta release of 1.2!

API Changes

  • Added experimental Snapshot.unsafeEnter/unsafeLeave (I108f3)
  • Added experimental Snapshot.asContextElement() API (Iff072)
  • The @ComposableTarget annotation and annotations marked by @ComposableTargetMarker can now be used at the file scope using the @file prefix. Using a target annotation at the file scope will cause the compiler to assume all composable functions in the file are intended to be target the associated applier. For example, using @file:UiComposable declares that all @Composable functions target the Compose UI applier. A function that needs to target another applier must explicitly supply the target marker annotation for the desired applier. (I40804)

Compose UI: v1.2.0-beta01

May 11, 2022

androidx.compose.ui:ui-*:1.2.0-beta01 is released. Version 1.2.0-beta01 contains these commits.

New Features

  • This is the first beta release of 1.2!

API Changes

  • Added experimental BeyondBoundsInterval that can be used by custom implementations of LazyList when they layout items beyond visible bounds (Ifabfb, b/184670295)
  • Keyed versions of Modifier.composed are now stable API (Ie65e4, b/229988420)
  • Simplified the rememberNestedScrollConnection API to use composition locals to acquire the current view information (I67ca7)
  • The @ComposableTarget annotation and annotations marked by @ComposableTargetMarker can now be used at the file scope using the @file prefix. Using a target annotation at the file scope will cause the compiler to assume all composable functions in the file are intended to be target the associated applier. For example, using @file:UiComposable declares that all @Composable functions target the Compose UI applier. A function that needs to target another applier must explicitly supply the target marker annotation for the desired applier. (I40804)
  • Introduced new experimental, platform independent, test API: an interface ComposeUiTest and a fun runComposeUiTest(block: ComposeUiTest.() -> Unit), that can be used to run Compose Ui tests without the need for a TestRule. To run a test without a ComposeTestRule, pass the test as a lambda to runComposeUiTest, and use the methods and members in the receiver scope ComposeUiTest, which are the same ones as in ComposeContentTestRule.

    The Android specific interface AndroidComposeUiTest and fun runAndroidComposeUiTest(block: AndroidComposeUiTest.() -> Unit) are added to provide access to the underlying Activity, similar to AndroidComposeTestRule. For even more control, you can instantiate a class AndroidComposeUiTestEnvironment yourself.

    The Desktop implementation is the class DesktopComposeUiTest, but no Desktop specific run functions are offered at the moment.

    Migrating a test from a ComposeTestRule to ComposeUiTest can be done like this (Android example). From:

    @RunWith(AndroidJUnit4::class)
    class MyTest {
        @get:Rule val rule = createComposeRule()
        @Test
        fun test() {
            rule.setContent {
                Text("Hello Compose!")
            }
            rule.onNodeWithText("Hello Compose!").assertExists()
        }
    }
    

    To:

    @RunWith(AndroidJUnit4::class)
    class MyTest {
        @Test
        @OptIn(ExperimentalTestApi::class)
        fun test() = runComposeUiTest {
            setContent {
                Text("Hello Compose!")
            }
            onNodeWithText("Hello Compose!").assertExists()
        }
    }
    
  • For now, ComposeContentTestRule and ComposeTestRule don't extend from ComposeUiTest, which means extension functions on ComposeUiTest can't be called yet on the TestRule interface. When ComposeUiTest graduates to stable API, ComposeContentTestRule and ComposeTestRule will be changed to extend from ComposeUiTest. (Ib4e90)

  • LineHeightBehavior is renamed as LineHeightStyle

  • LineVerticalAlignment is renamed as LineHeightStyle.Alignment

  • Renames LineHeightTrim is renamed as LineHeightStyle.Trim

  • Default constructor values from LineHeightStyle is removed (I582bf, b/181155707)

  • Added Brush to TextStyle and SpanStyle to provide a way to draw text with gradient coloring. (I53869, b/187839528)

  • trimFirstLineTop, trimLastLineBottom attributes of LineHeightBehavior changed into a single enum: LineHeightTrim. LineHeightTrim have values of 4 states defined by two booleans: FirstLineTop, LastLineBottom, Both and None (Ifc6a5, b/181155707)

  • Added LineHeightBehavior to the TextStyle and ParagraphStyle. LineHeightBehavior controls whether line height is applied to the top of the first line and to the bottom of the last line. It also defines the alignment of line in the space provided by TextStyle(lineHeight).

    For example it is possible to get a behavior similar to what CSS defines via LineHeightBehavior(alignment = LineVerticalAlignment.Center, trimFirstLineTop=false, trimLastLineBottom = false).

  • trimFirstLineTop, trimLastLineBottom configurations works correctly only when includeFontPadding is false. (I97332, b/181155707)

  • PlatformParagraphStyle.lerp and PlatformSpanStyle.lerp functions are changed to be top level functions (I9a268)

Bug Fixes

  • PointerInputChange::copy documentation now correctly states that it is a shallow copy. (I182f5)
  • Support ellipsis when height is limited and doesn't fit all text lines (Ie528c, b/168720622)
  • Turned on default includeFontPadding. It is possible to turn off the includeFontPadding using TextStyle.platformTextStyle attribute. In the near future we will change the default behavior however until that time this allows us to better integrate line height improvements (aosp/2058653) and solve TextField clipping issues. (I01423, b/171394808)

External Contribution

  • MouseInjectionScope.scroll(delta = someDelta) is now inverted on Android if we scroll vertically (if someDelta is positive, it will scroll downward) (Ifb697, b/224992993)

Core and Core-ktx: v1.8.0-rc01

May 11, 2022

androidx.core:core:1.8.0-rc01 and androidx.core:core-ktx:1.8.0-rc01 are released. Version 1.8.0-rc01 contains these commits.

API Changes

  • Added BuildCompat check for next pre-release cycle (If5a8f, b/229859122)
  • Updated BuildCompat.isAtLeastT() for finalized SDK_INT value. (Iffae0)

Customview Poolingcontainer: v1.0.0-beta01

May 11, 2022

androidx.customview:customview-poolingcontainer:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.

New Features

  • Improved documentation!

DragAndDrop: v1.0.0

May 11, 2022

androidx.draganddrop:draganddrop:1.0.0 is released. Version 1.0.0 contains these commits.

Major features of 1.0.0

DropHelper, the first member of the draganddrop library, is a utility class that simplifies implementation of drag and drop capabilities. Use DropHelper to specify drop targets, customize drop target highlighting, and define how dropped data is handled.

  • DropHelper leverages Jetpack’s OnReceiveContentListener to provide target-specific processing of drag and drop ClipData. DropHelper enhances the user experience by configuring drop targets to display a highlight as users drag content over the targets. The DropHelper.Options nested class enables you to customize the appearance of the default highlight.
  • DropHelper attaches an OnReceiveContentListener to drop targets and configures drop targets to listen for drag and drop events. Do not attach an OnDragListener or additional OnReceiveContentListener to drop targets when using DropHelper.
  • DropHelper.Options gives you the ability to list all EditText elements contained in the view hierarchy of complex drop targets. If any are present, they must be specified in this way. DropHelper prevents the EditText elements from stealing focus from the drop target when users drag data over the target. If the drag and drop ClipData includes text and URI data, DropHelper selects one of the EditText elements in the drop target to handle the text data when the ClipData is dropped.

For more information, see the Drag and drop developer’s guide.

Fragment: v1.5.0-rc01

May 11, 2022

androidx.fragment:fragment:1.5.0-rc01, androidx.fragment:fragment-ktx:1.5.0-rc01, and androidx.fragment:fragment-testing:1.5.0-rc01 are released. Version 1.5.0-rc01 contains these commits.

Saved Instance State Refactoring

  • The state associated with each individual fragment is now saved separately from the internal state of the FragmentManager, thus allowing you to correlate the amount of saved state associated with an individual fragment with the unique IDs present in the Fragment debug logging. (a153e0, b/207158202)

Health Connect Client: v1.0.0-alpha01

May 11, 2022

androidx.health:health-connect-client:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits.

New Features

  • API for reading fitness and health records shared by other apps.
  • API for writing fitness and health records to share with other apps.
  • API to retrieve aggregated metrics for accessible records.
  • API to retrieve incremental changes (insert, update or delete) of records by other apps.
  • API to prompt users for health permissions.
  • API to check for permissions or revoke granted health permissions.

Lifecycle: v2.5.0-rc01

May 11, 2022

androidx.lifecycle:lifecycle-*:2.5.0-rc01 is released. Version 2.5.0-rc01 contains these commits.

Bug Fixes

  • MediatorLiveData.addSource() now throws a NullPointerException when passed a null source instead of propagating the null source to observers.(Ibd0fb, b/123085232)

Navigation: v2.5.0-rc01

May 11, 2022

androidx.navigation:navigation-*:2.5.0-rc01 is released. Version 2.5.0-rc01 contains these commits.

New Features

  • Added a new lint rule to warn against placing <deeplink> elements inside <activity> elements in your navigation.xml file.(Ic15a5, b/178403185)

Bug Fixes

  • Composable scopes in NavHost and DialogHost are now disposed in the expected order, i.e. inner composabled are disposed before outer composables. (I157e6)
  • Navigation SafeArgs now uses PathSensitivity.RELATIVE in the ArgumentsGenerationTask to allow for cache relocatability. This means the cache entry can now be re-used from a CI build to a local build. (I5f67c, b/173420454)
  • The UnrememberedGetBackStackEntryDetector lint rule has been updated to ensure that the remember call surrounding the call to getBackStackEntry() also passes in a NavBackStackEntry object as a key.(Ib7081, b/227382831)

ProfileInstaller: v1.2.0-beta01

May 11, 2022

androidx.profileinstaller:profileinstaller:1.2.0-beta01 is released. Version 1.2.0-beta01 contains these commits.

API Changes

  • Add new APIs in ProfileInstallReceiver to get more consistent results with Macrobenchmarks when using baseline profiles. (If2ae5, b/215740637)

Bug Fixes

Savedstate: v1.2.0-rc01

May 11, 2022

androidx.savedstate:savedstate:1.2.0-rc01 and androidx.savedstate:savedstate-ktx:1.2.0-rc01 are released. Version 1.2.0-rc01 contains these commits.

Documentation Changes

  • The SavedStateRegistryOwner Kdocs have been updated to clarify the responsibilities and contract that the owner has on how it should implement the interface or when they should call the methods on SavedStateRegistryController. (Iefc95, b/228887344)

Tracing: v1.1.0

May 11, 2022

androidx.tracing:tracing:1.1.0 and androidx.tracing:tracing-ktx:1.1.0 are released. Version 1.1.0 contains these commits.

Important changes since 1.0.0

  • Added Trace.forceEnableAppTracing() an API to force-enable app trace section capture (i.e. android.os.Trace / androidx.tracing APIs) on non-debuggable builds. Call this at the beginning of startup to enable non-debuggable accurate system tracing before the introduction of the profileable manifest tag in API 29. (I3a309)
  • Avoid class verification errors when Trace.java is loaded for the first time (05f6b4 and cb101f)

Wear Compose: v1.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)

Wear Tiles: v1.1.0-alpha06

May 11, 2022

androidx.wear.tiles:tiles-*:1.1.0-alpha06 is released. Version 1.1.0-alpha06 contains these commits.

New Features

  • The new layout has been added to the Material Layouts sub library - MultiButtonLayout. It represents a layout that can contain between 1 and 7 buttons arranged in line with the Material guidelines. In most cases, this layout should be passed in as a content to the PrimaryLayout. (Ib727f)

API Changes

  • MultiSlotLayout has been refactored to have only slots in it. This layout should be passed as a content to the main PrimaryLayout. (I1870f)
  • Updated defined default colors for CircularProgressIndicator to be one value instead of primary and secondary. (I64a51)
  • Added getter for horizontal spacer in MultiSlotLayout. (I11e1e)

Bug Fixes

  • Android tests for Components have been added to Tiles Material. (I20041)

Wear Watchface: v1.1.0-beta02

May 11, 2022

androidx.wear.watchface:watchface-*:1.1.0-beta02 is released. Version 1.1.0-beta02 contains these commits.

New Features

  • We’ve added experimental support for new ComplicationData types, these are not yet ready for use but watch this space.

API Changes

  • We've added BoundingArc, an experimental class that describes the geometry of an edge complication slot. This has been added to ComplicationSlot and plumbed through to ComplicationSlotState and WatchFaceMetadataClient. (I61a40)
  • We've added the ability to inherit settings in UserStyleSetting XML. It lets you reduce verbosity and share a setting between watchfaces. (Ief841)
  • We have added two new experimental types of ComplicationData: ListComplicationData & ProtoLayoutComplicationData. Currently there's no rendering support for either of these types and WearOS doesn't currently recognize these types if added to a ComplicationDataSource's manifest. (I1811c)

Bug Fixes

  • Fix serialization of TimeLineEntry type. We were not serializing the TimeLineEntry type which meant cached TimeLineEntries of type NoData would be incorrectly interpreted as having the parent complication's type leading to NPEs when non-existent required fields were accessed. (55ffdf5)
  • Fix a bug where setComplicationData dropped timeline fields(fb392f5)
  • Fixes a bug where very occasionally runBlockingWithTracing would lead to an NPE(12ca62e)
  • Fixes a bug where we sometimes get ClassNotFoundException: android.support.wearable.complications.ComplicationText when receiving a complication.(217942d9)
  • Fixes a bug in GlesRenderer.backgroundThreadInitInternal where it was only calling onBackgroundThreadGlContextCreated if EGL14.eglCreateContext was called. Fixes another bug where there was a visual glitch in the screenshot caused by verticalFlip.(c674ad2)
  • Fix WatchFaceService XML version check, it was loading from the wrong package.(dfa06f3)
  • Placeholder wire format now uses an inner bundle. We don't want placeholders to break existing watchfaces which might use the hidden inner a.s.w.c.ComplicationData. Previously the wire format of a NoDataComplication data stored the placeholder in the usual fields (problematic because old watch faces would render the placeholder string which isn't intended), instead we now use an inner bundle to fully isolate this.(d5e7bd2)

WindowManager: v1.1.0-alpha02

May 11, 2022

androidx.window:window-*:1.1.0-alpha02 is released. Version 1.1.0-alpha02 contains these commits.

New Features

  • Release the adapter libraries to support Java and RxJava.

WindowManager: v1.1.0-alpha01

May 11, 2022

androidx.window:window-*:1.1.0-alpha01 is released. Version 1.1.0-alpha01 contains these commits.

New Features

  • Release adapters to support java and RxJava