Skip to content

2022-04-20

Choose a tag to compare

@github-actions github-actions released this 20 Apr 18:44
· 218 commits to main since this release

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

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.maxHeight is 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 use consume() to consume the change completely. You can use isConsumed to determine whether or not someone else has previously consumed the change.
  • PointerInputChange::copy() now always makes a deep copy. It means that copies of PointerInputChange will be consumed once one of the copies is consumed. If you want to create an unbound PointerInputChange, use constructor instead. (Ie6be4, b/225669674)
  • New experimental LazyLayout API is introduced. This allows you to build your own components like LazyColumn of LazyVerticalGrid. Note that the API is in its early stages and can be changed in the future releases. (Iba2bc, b/166591700)
  • AndroidFont now takes typefaceLoader as a constructor parameter. (I2c971)
  • WindowInsets companion 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 use consume() to consume the change completely. You can use isConsumed to determine whether or not someone else has previously consumed the change.
  • PointerInputChange::copy() now always makes a deep copy. It means that copies of PointerInputChange will be consumed once one of the copies is consumed. If you want to create an unbound PointerInputChange, 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-class is 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 use calculateWindowSizeClass to 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 for WindowSizeClass. 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 from BottomAppBar with FAB. (I92c47)
  • Adds Material3 FilledIconButton, FilledTonalIconButton, and OutlinedIconButton. (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 use consume() to consume the change completely. You can use isConsumed to determine whether or not someone else has previously consumed the change.
  • PointerInputChange::copy() now always makes a deep copy. It means that copies of PointerInputChange will be consumed once one of the copies is consumed. If you want to create an unbound PointerInputChange, use constructor instead. (Ie6be4, b/225669674)
  • Changes to the Cards API to receive the container and content colors via a CardColors interface, and to support a disabled state for clickable cards. (I927df)
  • The parameter backgroundColor has been renamed containerColor in Material 3 text fields for improved consistency with other components. (I6fbd9)

Bug Fixes

  • Updates to the standard IconButton to 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 PaddingValues are 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 TracingInProgress to the CompositionTracer interface. (Ic6f12)
  • Add recomposeScopeIdentity to Composer (I0c873)
  • Restricted tracing APIs (Composer.setTracer) to OptIn(InternalComposeTracingApi). (I9187f)
  • Added ResuableContentHost which 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 pluralStringResource functions 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.maxHeight is 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 @Stable interface (I9dafe)
  • Partial consumption (down OR position) has been deprecated in PointerInputChange. You can use consume() to consume the change completely. You can use isConsumed to determine whether or not someone else has previously consumed the change.
  • PointerInputChange::copy() now always makes a deep copy. It means that copies of PointerInputChange will be consumed once one of the copies is consumed. If you want to create an unbound PointerInputChange, 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)
  • AndroidFont now 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

  • DialogFragment has added a new dismissNow method that uses commitNow for parity with the showNow function. Note that this will not make the Dialog be dismissed immediately, it will only synchronously update the state of the FragmentManager. (I15c36, b/72644830)

Saved Instance State Refactoring

  • FragmentManager now saves its saved instance state into a Bundle instead of directly in a custom Parcelable. 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.saveable property delegates to use property names as keys for persisting state into the SavedStateHandle (I8bb86, b/225014345)

Bug Fixes

  • Fixed an issue where nesting one NavHost within another NavHost in a non-primary bottom navigation tab would lead to an IllegalStateException when 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 CarAppLibrary on 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 MediaRouterParams that 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 MissingGetterMatchingBuilder is 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

  • DialogNavigator now uses popWithTransition when executing a dismiss() call. This fixes a race condition when using a ViewModel within dialog destination that would cause an IllegalStateException when 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 an IllegalStateException when nesting one NavHost within another NavHost in 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 SavedStateRegistry and ViewTreeSavedStateRegistryOwner classes have been rewritten in Kotlin. For ViewTreeSavedStateRegistryOwner, this is a source incompatible change for those classes written in Kotlin - you must now directly import and use the Kotlin extension methods on View of androidx.savedstate.setViewTreeSavedStateRegistryOwner and androidx.savedstate.findViewTreeSavedStateRegistryOwner to set and find a previously set owner. This replaces the savedstate-ktx API of findViewTreeSavedStateRegistryOwner. 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, .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)

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 WatchFaceMetadataClient methods (getUserStyleSchema, getComplicationSlotMetadataMap, getUserStyleFlavors) and HeadlessWatchFaceClient.getUserStyleFlavors throw unchecked RuntimeException instead of WatchFaceException. (I0718a)
  • WatchFaceMetadataClient.WatchFaceException has been moved out of the class to allow it to be reused. (I4e869)

Bug Fixes

  • WatchFaceMetadataClient will no longer crash when sent partial ComplicationSlotBounds.(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

  • Add APIs that customize finishing behavior for containers in activity splits (I1a1e4)
  • Added a new configuration option for activity split rules. (Iec6af)