2022-04-20
Activity: v1.5.0-beta01
April 20, 2022
androidx.activity:activity:1.5.0-beta01, androidx.activity:activity-compose:1.5.0-beta01, and androidx.activity:activity-ktx:1.5.0-beta01 are released. Version 1.5.0-beta01 contains these commits.
Dependency updates
- Activity now depends on Lifecycle
2.4.0-beta01.
Benchmark: v1.1.0-rc01
April 20, 2022
androidx.benchmark:benchmark-*:1.1.0-rc01 is released. Version 1.1.0-rc01 contains these commits.
Bug Fixes
- Baseline profile output links in Android Studio now use a unique file name. This way the output always reflects the latest results of using a
BaselineProfileRule. ( aosp/2057008, b/228203086 )
Compose Animation: v1.2.0-alpha08
April 20, 2022
androidx.compose.animation:animation:1.2.0-alpha08, androidx.compose.animation:animation-core:1.2.0-alpha08, and androidx.compose.animation:animation-graphics:1.2.0-alpha08 are released. Version 1.2.0-alpha08 contains these commits.
Compose Compiler: v1.2.0-alpha08
April 20, 2022
androidx.compose.compiler:compiler:1.2.0-alpha08 is released. Version 1.2.0-alpha08 contains these commits.
Compose Foundation: v1.2.0-alpha08
April 20, 2022
androidx.compose.foundation:foundation:1.2.0-alpha08 and androidx.compose.foundation:foundation-layout:1.2.0-alpha08 are released. Version 1.2.0-alpha08 contains these commits.
API Changes
- Display all available weights for systems fonts on Android when using
FontFamily.SansSerif. This will use fallback font names like sans-serif-medium internally on API 21-28. This is a behavior change as previously only weights 400 and 700 were supported on API 21-28. (I380fe, b/156048036, b/226441992) - Paragraph and MultiParagraph are now accepting Constraints parameter. Passing
Constraints.maxHeightis a no-op at the moment but will allow to do some calculation in the future, like ellipsizing based on the height. (I6afee, b/168720622) SubcomposeSlotReusePolicy.getSlotsToRetain()now accepts a custom MutableSet-like class which doesn't allow adding new items in it. (Icd314)- Partial consumption (down OR position) has been deprecated in
PointerInputChange. You can useconsume()to consume the change completely. You can useisConsumedto determine whether or not someone else has previously consumed the change. PointerInputChange::copy()now always makes a deep copy. It means that copies ofPointerInputChangewill be consumed once one of the copies is consumed. If you want to create an unboundPointerInputChange, use constructor instead. (Ie6be4, b/225669674)- New experimental
LazyLayoutAPI is introduced. This allows you to build your own components likeLazyColumnofLazyVerticalGrid. Note that the API is in its early stages and can be changed in the future releases. (Iba2bc, b/166591700) AndroidFontnow takestypefaceLoaderas a constructor parameter. (I2c971)WindowInsetscompanion now exposes the visibility (whether they are on the screen, regardless of whether they intersect with the window) and the size they could be if they are available on the device, but not currently active. (I65182, b/217770337)
Compose Material: v1.2.0-alpha08
April 20, 2022
androidx.compose.material:material-*:1.2.0-alpha08 is released. Version 1.2.0-alpha08 contains these commits.
API Changes
- Partial consumption (down OR position) has been deprecated in
PointerInputChange. You can useconsume()to consume the change completely. You can useisConsumedto determine whether or not someone else has previously consumed the change. PointerInputChange::copy()now always makes a deep copy. It means that copies ofPointerInputChangewill be consumed once one of the copies is consumed. If you want to create an unboundPointerInputChange, use constructor instead. (Ie6be4, b/225669674)
Compose Material 3: v1.0.0-alpha10
April 20, 2022
androidx.compose.material3:material3:1.0.0-alpha10 and androidx.compose.material3:material3-window-size-class:1.0.0-alpha10 are released. Version 1.0.0-alpha10 contains these commits.
New Features
material3-window-size-classis a new library that provides support for window size classes: a set of opinionated viewport breakpoints for you to design, develop, and test resizable application layouts against. You can usecalculateWindowSizeClassto retrieve a window size class instance, which you can use to determine how your UI should appear, such as showing a navigation rail instead of bottom navigation for larger window sizes. For more information and sample usage see the API reference documentation forWindowSizeClass. For more information on window size class definitions, see the public guidance on supporting different screen sizes.
API Changes
- Adds default FAB elevation for
BottomAppBar, removes trailing lambda fromBottomAppBarwith FAB. (I92c47) - Adds Material3
FilledIconButton,FilledTonalIconButton, andOutlinedIconButton. (Ib2bda) - Updates Material 3 Snackbar API to accept color values for the optional action and dismiss-action. (Ibe4b4)
- Partial consumption (down OR position) has been deprecated in
PointerInputChange. You can useconsume()to consume the change completely. You can useisConsumedto determine whether or not someone else has previously consumed the change. PointerInputChange::copy()now always makes a deep copy. It means that copies ofPointerInputChangewill be consumed once one of the copies is consumed. If you want to create an unboundPointerInputChange, use constructor instead. (Ie6be4, b/225669674)- Changes to the Cards API to receive the container and content colors via a
CardColorsinterface, and to support a disabled state for clickable cards. (I927df) - The parameter
backgroundColorhas been renamedcontainerColorin Material 3 text fields for improved consistency with other components. (I6fbd9)
Bug Fixes
- Updates to the standard
IconButtonto align it with the Material3 spec. (I09eab) - Move the top bar height of material3 Scaffold into the padding passed to content, allowing the content to render underneath the top app bar. If the
PaddingValuesare ignored, then the content might be obscured by the top bar. (I83cbc, b/217776202)
Compose Runtime: v1.2.0-alpha08
April 20, 2022
androidx.compose.runtime:runtime-*:1.2.0-alpha08 is released. Version 1.2.0-alpha08 contains these commits.
API Changes
- Added
TracingInProgressto theCompositionTracerinterface. (Ic6f12) - Add
recomposeScopeIdentityto Composer (I0c873) - Restricted tracing APIs (Composer.setTracer) to
OptIn(InternalComposeTracingApi). (I9187f) - Added
ResuableContentHostwhich allows better control over the lifetime of state created for reusable content. For example, if a sub-composition is temporarily not in use then the content can be deactivated causing all the remembered state in the composition to be forgotten triggering, for example, all disposable effects. (I2c0f2, b/220322704)
Compose UI: v1.2.0-alpha08
April 20, 2022
androidx.compose.ui:ui-*:1.2.0-alpha08 is released. Version 1.2.0-alpha08 contains these commits.
API Changes
- The
pluralStringResourcefunctions were marked as experimental in order to allow evolution to support better internationalization in the future. (If24e4) - Paragraph and MultiParagraph are now accepting Constraints parameter. Passing
Constraints.maxHeightis a no-op at the moment but will allow to do some calculation in the future, like ellipsizing based on the height. (I6afee, b/168720622) SubcomposeSlotReusePolicy.getSlotsToRetain()now accepts a custom MutableSet-like class which doesn't allow adding new items in it. (Icd314)- PointerIcon is now a
@Stableinterface (I9dafe) - Partial consumption (down OR position) has been deprecated in
PointerInputChange. You can useconsume()to consume the change completely. You can useisConsumedto determine whether or not someone else has previously consumed the change. PointerInputChange::copy()now always makes a deep copy. It means that copies ofPointerInputChangewill be consumed once one of the copies is consumed. If you want to create an unboundPointerInputChange, use constructor instead. (Ie6be4, b/225669674)- Enable Nested Scroll interop between Compose and View in the direction Compose > View. This means that a compose parent will be able to receive nested scroll deltas from a nested scroll view. (If7949, b/174348612)
- New
SemanticsProperty testTagsAsResourceId, which can be used to make Compose conform with UIAutomator tests designed for the View system. (I39c20) - Display all available weights for systems fonts on Android when using
FontFamily.SansSerif. This will use fallback font names like sans-serif-medium internally on API 21-28. This is a behavior change as previously only weights 400 and 700 were supported on API 21-28. (I380fe, b/156048036, b/226441992) - Paragraph and Multiparagraph instructors reordered positional arguments to before optional arguments. (Idafaa)
AndroidFontnow takes typefaceLoader as a constructor parameter. (I2c971)
Core and Core-ktx: v1.8.0-beta01
April 20, 2022
androidx.core:core:1.8.0-beta01 and androidx.core:core-ktx:1.8.0-beta01 are released with no changes since 1.8.0-alpha07. Version 1.8.0-beta01 contains these commits.
Core-Animation and Core-Animation-Testing 1.0.0: v1.0.0-beta01
April 20, 2022
androidx.core:core-animation:1.0.0-beta01 is released with no changes since 1.0.0-alpha02. Version 1.0.0-beta01 contains these commits.
DragAndDrop: v1.0.0-rc01
April 20, 2022
androidx.draganddrop:draganddrop:1.0.0-rc01 is released. Version 1.0.0-rc01 contains these commits.
- No changes since the last beta release.
Emoji2: v1.2.0-alpha04
April 20, 2022
androidx.emoji2:emoji2-*:1.2.0-alpha04 is released. Version 1.2.0-alpha04 contains these commits.
New Features
- No changes in this release.
Fragment: v1.5.0-beta01
April 20, 2022
androidx.fragment:fragment:1.5.0-beta01, androidx.fragment:fragment-ktx:1.5.0-beta01, and androidx.fragment:fragment-testing:1.5.0-beta01 are released. Version 1.5.0-beta01 contains these commits.
API Changes
DialogFragmenthas added a newdismissNowmethod that usescommitNowfor parity with theshowNowfunction. Note that this will not make theDialogbe dismissed immediately, it will only synchronously update the state of theFragmentManager. (I15c36, b/72644830)
Saved Instance State Refactoring
FragmentManagernow saves its saved instance state into aBundleinstead of directly in a customParcelable. This is the first step in providing additional transparency into what is actually being saved by Fragments. (I93807, b/207158202)- Results set via the Fragment Result APIs that have not yet been delivered are now saved separately from the internal state of the
FragmentManager. This will allow for additional transparency into what results are being saved as part of your saved instance state. (I6ea12, b/207158202)
Lifecycle: v2.5.0-beta01
April 20, 2022
androidx.lifecycle:lifecycle-*:2.5.0-beta01 is released. Version 2.5.0-beta01 contains these commits.
API Changes
- Added
SavedStateHandle.saveableproperty delegates to use property names as keys for persisting state into theSavedStateHandle(I8bb86, b/225014345)
Bug Fixes
- Fixed an issue where nesting one
NavHostwithin anotherNavHostin a non-primary bottom navigation tab would lead to anIllegalStateExceptionwhen using multiple back stacks. (I11bd5, b/228865698)
Media: v1.6.0
April 20, 2022
androidx.media:media:1.6.0 is released. Version 1.6.0 contains these commits.
Important changes since 1.5.0
- Add extras necessary to set up signIn/Settings page using
CarAppLibraryon a media app for Android Auto.
Mediarouter: v1.3.0
April 20, 2022
androidx.mediarouter:mediarouter:1.3.0 is released. Version 1.3.0 contains these commits.
Important changes since 1.2.0
- Add a flag into
MediaRouterParamsthat can be used to disable seamless transfer at runtime. - Added a testing artifact which can reset the
MediaRouter. - Add a router param for UX tweak in
MediaRouterControllerDialog. - Annotated nullness for public methods.
- API lint check for
MissingGetterMatchingBuilderis enabled for androidx. - Update dependency on core for mediarouter to 1.6.0.
Navigation: v2.5.0-beta01
April 20, 2022
androidx.navigation:navigation-*:2.5.0-beta01 is released. Version 2.5.0-beta01 contains these commits.
Bug Fixes
DialogNavigatornow usespopWithTransitionwhen executing adismiss()call. This fixes a race condition when using aViewModelwithindialogdestination that would cause anIllegalStateExceptionwhen dismissing the Dialog by either using system back or tapping outside of the dialog to exit. (Id7376, b/226552301)
Dependency Updates
- Navigation now depends on Lifecycle
2.5.0-beta01, fixing anIllegalStateExceptionwhen nesting oneNavHostwithin anotherNavHostin a non-primary bottom navigation tab when using multiple back stacks.
Savedstate: v1.2.0-beta01
April 20, 2022
androidx.savedstate:savedstate:1.2.0-beta01 and androidx.savedstate:savedstate-ktx:1.2.0-beta01 are released. Version 1.2.0-beta01 contains these commits.
API Changes
- The
SavedStateRegistryandViewTreeSavedStateRegistryOwnerclasses have been rewritten in Kotlin. ForViewTreeSavedStateRegistryOwner, this is a source incompatible change for those classes written in Kotlin - you must now directly import and use the Kotlin extension methods onViewofandroidx.savedstate.setViewTreeSavedStateRegistryOwnerandandroidx.savedstate.findViewTreeSavedStateRegistryOwnerto set and find a previously set owner. This replaces thesavedstate-ktxAPI offindViewTreeSavedStateRegistryOwner. This is binary compatible and remains source compatible for implementations written in the Java programming language. (b/220191285)
Tracing: v1.1.0-rc01
April 20, 2022
androidx.tracing:tracing:1.1.0-rc01 and androidx.tracing:tracing-ktx:1.1.0-rc01 are released, with no changes since beta01. Version 1.1.0-rc01 contains these commits.
Vectordrawable: v1.2.0-beta01
April 20, 2022
androidx.vectordrawable:vectordrawable:1.2.0-beta01 is released with no changes since 1.2.0-alpha02. Version 1.2.0-beta01 contains these commits.
Vectordrawable-Seekable 1.0.0: v1.0.0-beta01
April 20, 2022
androidx.vectordrawable:vectordrawable-seekable:1.0.0-beta01 is released with no changes since 1.0.0-alpha02. Version 1.0.0-beta01 contains these commits.
Wear Compose: v1.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,.radialGradientBackgroundand.angularGradientBackground(I8f392) - Allow curved text overflow mode (clip/ellipsis/visible) to be specified. (I8e7aa)
- Added
CurvedModifier.weightmodifier, 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,.angularSizeand.radialSizemodifiers 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 &
insideOutparameters and replaced with more expressive constants on new classes. Curved layout direction can now beLayoutDirectionaware, and it is inherited when not specified (If0e6a) - We have replaced
autoCenter: BooleanwithautoCenter: AutoCentringParamsin order to fix an API issue with theScalingLazyColumn. (Ia9c90) - We have renamed
iconTintColorandtoggleControlTintColortoiconColorandtoggleControlColorthroughout the API (Chip/ToggleChip/Dialog/Slider/Stepper/...) as the color is applied to the icon/toggleControl slot. (Ied238) - Rewrite
PageIndicatorStyleenum into value class (I2dc72) - We have added
RowScope/ColumnScope/BoxScopeto 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 thattimeColorandappColordefault tocontentColor, these properties can still all be individually overridden if needed. (I26b59) - Made
SwipeToDismissBoxState.Companionobject private (I39e84) - Fix parameters order for
InlineSliderandStepper. A simple change to follow api guidelines (I11fec) - We have removed the Saver object for
SwipeToDismissBoxStateas it was not used. (Ifb54e) - We have updated
CompactChipto 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
ScalingLazyListLayoutInfoto enable developers to know the amount ofcontentPaddingandautoCenteringPaddingthat has been applied. These can be useful for developers when calculating fling/scroll (I7577b) - We have implemented in/out transitions for Dialog. A
showDialogparameter 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 addedSwipeToDismissBoxoverload. (I682a0) - In order to better support i18n and a11y we have changed
ToggleChipandSplitToggleChipso that they no longer have a default for thetoggleControlslot. We have also changedToggleChipDefaultsso 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()andRadioIcon()->radioIcon()- this allows and encourages developers to create their ownIcon()composables with an appropriatecontentDescriptionset. (I5bb5b) - We have added a
SwipeDismissableNavHostStateparameter toSwipeDismissableNavHost. This supports use of edge-swiping on screens used as navigation destinations, becauseSwipeToDismissBoxStatecan now be hoisted and used to initialize bothSwipeDismissableNavHostStateandModifier.edgeSwipeToDismisson 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)
Wear Watchface: v1.1.0-beta01
April 20, 2022
androidx.wear.watchface:watchface-*:1.1.0-beta01 is released. Version 1.1.0-beta01 contains these commits.
API Changes
- Now
WatchFaceMetadataClientmethods (getUserStyleSchema,getComplicationSlotMetadataMap,getUserStyleFlavors) andHeadlessWatchFaceClient.getUserStyleFlavorsthrow unchecked RuntimeException instead ofWatchFaceException. (I0718a) WatchFaceMetadataClient.WatchFaceExceptionhas been moved out of the class to allow it to be reused. (I4e869)
Bug Fixes
WatchFaceMetadataClientwill no longer crash when sent partialComplicationSlotBounds.(Iaafd)
WindowManager: v1.1.0-alpha01
April 20, 2022
androidx.window:window:1.1.0-alpha01 is released. Version 1.1.0-alpha01 contains these commits.
New Features
- Fixes a bug where backgrounding an app stops emitting fold features.
- Expand on the experimental ActivityEmbedding API.
API Changes
- A public API to check if an activity is being embedded. (I39eb7)
Bug Fixes