2022-05-10
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
CompilationModehaving 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=falseMade it possible to share a module between macrobenchmarks and baseline profile generating tests by adding
androidx.benchmark.enabledRulesinstrumentation argument. Pass in 'Macrobenchmark', or 'BaselineProfile' to just run one type of test, e.g. when generatingBaselineProfileson 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 ofVideoCapture<Recorder>to fail on recording withMediaCodec.CodecException, especially on API 21-22 devices. (Ie7f68) - Fix captured images of
CameraExtensionsActivitydo not be deleted inImageCaptureTest
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
BeyondBoundsIntervalthat can be used by custom implementations ofLazyListwhen they layout items beyond visible bounds (Ifabfb, b/184670295) LineHeightBehavioris renamed asLineHeightStyleLineVerticalAlignmentis renamed asLineHeightStyle.Alignment- Renames
LineHeightTrimis renamed asLineHeightStyle.Trim - Default constructor values from
LineHeightStyleis removed (I582bf, b/181155707) - Added default values for the optional members of
LazyLayoutItemProviderinterface. (Iba8a0) - In the
LazyLayoutItemProviderapi 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.itemsCountis renamed toitemCount(Id409c)- Added Brush to
TextStyleandSpanStyleto provide a way to draw text with gradient coloring. (I53869, b/187839528) trimFirstLineTop,trimLastLineBottomattributes ofLineHeightBehaviorchanged into a single enum:LineHeightTrim.LineHeightTrimhave values of 4 states defined by two booleans:FirstLineTop,LastLineBottom, Both and None (Ifc6a5, b/181155707)Added
LineHeightBehaviorto theTextStyleandParagraphStyle. LineHeightBehaviorcontrols 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 byTextStyle(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,trimLastLineBottomconfigurations works correctly only whenincludeFontPaddingis 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.bringIntoViewwill 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.bringIntoViewcalls 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 theincludeFontPaddingusingTextStyle.platformTextStyleattribute. 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 solveTextFieldclipping issues. (I01423, b/171394808) Modifier.bringIntoViewRequesterno longer usesonGloballyPositioned. (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.BorderStrokecomposable that draws a border stroke inOutlinedTextFieldtoTextFieldDefaults.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
RangeSliderto Material 3 (I18e38) - Adds Material3
AssistChipandInputChipsupport (I0d25a) - Adds Material3
FilterChipandSuggestionChipsupport (I9fdf3)
API Changes
- Renamed
TextFieldDefaults.BorderStrokecomposable that draws a border stroke inOutlinedTextFieldtoTextFieldDefaults.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
@ComposableTargetannotation and annotations marked by@ComposableTargetMarkercan now be used at the file scope using the@fileprefix. 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:UiComposabledeclares that all@Composablefunctions 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
BeyondBoundsIntervalthat can be used by custom implementations ofLazyListwhen they layout items beyond visible bounds (Ifabfb, b/184670295) - Keyed versions of
Modifier.composedare now stable API (Ie65e4, b/229988420) - Simplified the
rememberNestedScrollConnectionAPI to use composition locals to acquire the current view information (I67ca7) - The
@ComposableTargetannotation and annotations marked by@ComposableTargetMarkercan now be used at the file scope using the@fileprefix. 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:UiComposabledeclares that all@Composablefunctions 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 ComposeUiTestand afun runComposeUiTest(block: ComposeUiTest.() -> Unit), that can be used to run Compose Ui tests without the need for aTestRule. To run a test without aComposeTestRule, pass the test as a lambda torunComposeUiTest, and use the methods and members in the receiver scopeComposeUiTest, which are the same ones as inComposeContentTestRule.The Android specific
interface AndroidComposeUiTestandfun runAndroidComposeUiTest(block: AndroidComposeUiTest.() -> Unit)are added to provide access to the underlying Activity, similar toAndroidComposeTestRule. For even more control, you can instantiate aclass AndroidComposeUiTestEnvironmentyourself.The Desktop implementation is the
class DesktopComposeUiTest, but no Desktop specific run functions are offered at the moment.Migrating a test from a
ComposeTestRuletoComposeUiTestcan 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,
ComposeContentTestRuleandComposeTestRuledon't extend fromComposeUiTest, which means extension functions onComposeUiTestcan't be called yet on theTestRuleinterface. WhenComposeUiTestgraduates to stable API,ComposeContentTestRuleandComposeTestRulewill be changed to extend fromComposeUiTest. (Ib4e90)LineHeightBehavioris renamed asLineHeightStyleLineVerticalAlignmentis renamed asLineHeightStyle.AlignmentRenames
LineHeightTrimis renamed asLineHeightStyle.TrimDefault constructor values from
LineHeightStyleis removed (I582bf, b/181155707)Added
BrushtoTextStyleandSpanStyleto provide a way to draw text with gradient coloring. (I53869, b/187839528)trimFirstLineTop,trimLastLineBottomattributes ofLineHeightBehaviorchanged into a single enum:LineHeightTrim.LineHeightTrimhave values of 4 states defined by two booleans:FirstLineTop,LastLineBottom, Both and None (Ifc6a5, b/181155707)Added
LineHeightBehaviorto theTextStyleandParagraphStyle.LineHeightBehaviorcontrols 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 byTextStyle(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,trimLastLineBottomconfigurations works correctly only whenincludeFontPaddingis false. (I97332, b/181155707)PlatformParagraphStyle.lerpandPlatformSpanStyle.lerpfunctions are changed to be top level functions (I9a268)
Bug Fixes
PointerInputChange::copydocumentation 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 theincludeFontPaddingusingTextStyle.platformTextStyleattribute. 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 solveTextFieldclipping 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
BuildCompatcheck 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.
DropHelperleverages Jetpack’sOnReceiveContentListenerto provide target-specific processing of drag and dropClipData.DropHelperenhances the user experience by configuring drop targets to display a highlight as users drag content over the targets. TheDropHelper.Optionsnested class enables you to customize the appearance of the default highlight.DropHelperattaches anOnReceiveContentListenerto drop targets and configures drop targets to listen for drag and drop events. Do not attach anOnDragListeneror additionalOnReceiveContentListenerto drop targets when usingDropHelper.DropHelper.Optionsgives you the ability to list allEditTextelements contained in the view hierarchy of complex drop targets. If any are present, they must be specified in this way.DropHelperprevents theEditTextelements from stealing focus from the drop target when users drag data over the target. If the drag and dropClipDataincludes text and URI data,DropHelperselects one of theEditTextelements in the drop target to handle the text data when theClipDatais 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 aNullPointerExceptionwhen passed anullsource instead of propagating thenullsource 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 yournavigation.xmlfile.(Ic15a5, b/178403185)
Bug Fixes
- Composable scopes in
NavHostandDialogHostare now disposed in the expected order, i.e. inner composabled are disposed before outer composables. (I157e6) - Navigation SafeArgs now uses
PathSensitivity.RELATIVEin theArgumentsGenerationTaskto 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
UnrememberedGetBackStackEntryDetectorlint rule has been updated to ensure that theremembercall surrounding the call togetBackStackEntry()also passes in aNavBackStackEntryobject 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
ProfileInstallReceiverto get more consistent results withMacrobenchmarkswhen using baseline profiles. (If2ae5, b/215740637)
Bug Fixes
- Profile Installer throws a helpful message when trying to use metadata
V_001format on Android 12 and above. (aosp/1978526, b/217502387) - Profile Installer now uses
androidx.startupversion1.1.1. (aosp/2077099, b/229828376)
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
SavedStateRegistryOwnerKdocs 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 onSavedStateRegistryController. (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,CompactButtonandToggleButton- 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.CompactButtonoffers a single slot to take any content (icon, image or text) and is circular in shape with background size extra small.CompactButtonhas optional transparent padding around the background that increases the clickable area.ToggleButtonis 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
AppCardandTitleCardgiving 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
ToggleControlslot to show an icon such as a switch or radio button to show the checked state of the component. In addition, theSplitToggleChiphas 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 withcurvedRowandcurvedColumn, to lay out components around circular devices. See Wear Component Foundation below for more details onCurvedLayoutandCurvedModifier(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,PositionIndicatorandVignette) 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.
ScalingLazyColumnis 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
CurvedLayoutis 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 aCurvedLayoutis 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 fromCurvedModifier.basicCurvedText - an element in the
CurvedLayoutDSL,basicCurvedTextallows developers to easily write curved text following the curvature of a circle (usually at the edge of a circular screen).basicCurvedTextcan be only created within theCurvedLayoutto ensure the best experience, like being able to specify the positioning, and usingCurvedModifiers. 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. IfcurvedComposablehas 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 withcurvedComposable.curvedRow and curvedColumn - similar to Row and Column,
curvedRowandcurvedColumncan be nested inside aCurvedLayoutto lay elements out as needed. For acurvedRow, the angular layout direction and radial alignment may be specified. For acurvedColumn, 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
CompositionLocalinternal class (I42490) - We have added constant values for
Button,CompactButtonandToggleButtonicon sizes, as guidance (I57cab) - Add enabled parameter to
AppCardandTitleCard. Now they have a similar API toandroidx.compose.materialCards. 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
AppCardandTitleCard(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
MultiSlotLayouthas been refactored to have only slots in it. This layout should be passed as a content to the mainPrimaryLayout. (I1870f)- Updated defined default colors for
CircularProgressIndicatorto 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
ComplicationDatatypes, 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 toComplicationSlotand plumbed through toComplicationSlotStateandWatchFaceMetadataClient. (I61a40) - We've added the ability to inherit settings in
UserStyleSettingXML. 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 aComplicationDataSource'smanifest. (I1811c)
Bug Fixes
- Fix serialization of
TimeLineEntrytype. We were not serializing theTimeLineEntrytype which meant cachedTimeLineEntriesof 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
setComplicationDatadropped timeline fields(fb392f5) - Fixes a bug where very occasionally
runBlockingWithTracingwould lead to an NPE(12ca62e) - Fixes a bug where we sometimes get
ClassNotFoundException: android.support.wearable.complications.ComplicationTextwhen receiving a complication.(217942d9) - Fixes a bug in
GlesRenderer.backgroundThreadInitInternalwhere it was only callingonBackgroundThreadGlContextCreatedifEGL14.eglCreateContextwas called. Fixes another bug where there was a visual glitch in the screenshot caused byverticalFlip.(c674ad2) - Fix
WatchFaceServiceXML 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
NoDataComplicationdata 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