Skip to content

2024-01-10

Choose a tag to compare

@github-actions github-actions released this 10 Jan 18:37
· 107 commits to main since this release

Annotation-Experimental: v1.4.0-rc01

January 10, 2024

androidx.annotation:annotation-experimental:1.4.0-rc01 is released. Version 1.4.0-rc01 contains no changes since the previous release.

Collection: v1.4.0-rc01

January 10, 2024

androidx.collection:collection-*:1.4.0-rc01 is released with no changes. Version 1.4.0-rc01 contains these commits.

Compose Animation: v1.6.0-rc01

January 10, 2024

androidx.compose.animation:animation-*:1.6.0-rc01 is released. Version 1.6.0-rc01 contains these commits.

Compose Compiler: v1.5.8

January 10, 2024

androidx.compose.compiler:compiler:1.5.8 and androidx.compose.compiler:compiler-hosted:1.5.8 are released. Version 1.5.8 contains these commits.

New Features

  • Support for Kotlin 1.9.22

Bug Fixes

  • Fix bug where Compose Compiler build threw exceptions when built using Java21. Users who are using Compose Compiler from Google Maven (i.e., not building it themselves) were never impacted by this bug. (b/316644294)
  • Fix bug where COMPOSABLE_EXPECTED error was being reported for some callers of non-inlined lambdas. (b/309364913)
  • Add a compilation error for default parameters in open functions (previously only it was restricted only for abstract functions). Compose does not support substitution of default parameters from overridden functions at the moment, and overriding a composable function with default parameters was failing at runtime. Use @Suppress("ABSTRACT_COMPOSABLE_DEFAULT_PARAMETER_VALUE") to suppress, but note that overriding such function without providing a default value for parameter will result in a crash at runtime.(b/317490247)
  • Fixed bug in intrinsic remember which prevented values from propagating correctly. (b/316327367)

External Contribution

Compose Foundation: v1.6.0-rc01

January 10, 2024

androidx.compose.foundation:foundation-*:1.6.0-rc01 is released. Version 1.6.0-rc01 contains these commits.

API Changes

  • The DragAndDropTarget() extension constructor has been removed. Create a new instance using object: DragAndDropTarget {}. (I32318)

Compose Material: v1.6.0-rc01

January 10, 2024

androidx.compose.material:material-*:1.6.0-rc01 is released. Version 1.6.0-rc01 contains these commits.

Compose Material 3: v1.2.0-beta02

January 10, 2024

androidx.compose.material3:material3-*:1.2.0-beta02 is released. Version 1.2.0-beta02 contains these commits.

Known Bug - A bug in IconButtonColors will by default assign disabledContentColor to an alpha (0.38f) of LocalContentColor instead of the user specified contentColor. The workaround is to expliclty set the disabledContentColor. This will be fixed in the next release.

API Changes

  • Adding the capability to enable tooltip carets for Plain Tooltip APIs. (Ibf767)
  • SwipeToDismissState, rememberSwipeToDismiss and SwipeToDismissValue are all renamed to have _SwipeToDismissBox_. (I68d6d)

Bug Fixes

  • Fixed ListItem end padding value to align with spec. (Ibd68b, b/305342674)
  • Outline color for outlined card is now correctly mapped to OutlineVariant. (I75480, b/310979715)
  • Dynamic color now pulls from system defined color roles. This improves contrast for accessible content, and more closely aligns dynamic color to the Material spec. (I1de96)
  • Fixed ModalBottomSheet back handling on Android T/13+ when android:enableOnBackInvokedCallback="true". (I728dc, b/306196110)

Compose Material3 Adaptive: v1.0.0-alpha04

January 10, 2024

androidx.compose.material3:material3-adaptive:1.0.0-alpha04, androidx.compose.material3:material3-adaptive-android:1.0.0-alpha04, and androidx.compose.material3:material3-adaptive-desktop:1.0.0-alpha04 are released. Version 1.0.0-alpha04 contains these commits.

New Features

  • Added edge-to-edge support in pane scaffolds (I1b462)

API Changes

  • Moved hinge bounds properties in Posture to a list of hinge info (I24f90)

Bug Fixes

  • Fix AnimatedPane is not recomposed (c3f573d)

Compose Runtime: v1.6.0-rc01

January 10, 2024

androidx.compose.runtime:runtime-*:1.6.0-rc01 is released. Version 1.6.0-rc01 contains these commits.

Compose UI: v1.6.0-rc01

January 10, 2024

androidx.compose.ui:ui-*:1.6.0-rc01 is released. Version 1.6.0-rc01 contains these commits.

Bug Fixes

  • Optimized vector graphics implementation to improve performance by minimizing additional recompositions.

Core Performance: v1.0.0

January 10, 2024

androidx.core:core-performance:1.0.0, androidx.core:core-performance-play-services:1.0.0, and androidx.core:core-performance-testing:1.0.0 are released. Version 1.0.0 contains these commits.

Major features of 1.0.0

  • Core Performance - Provides a reliable mechanism for developers to identify the device’s level of performance at runtime to help optimize an app’s user experience accordingly.
  • Core Performance Play Services - Google-specific implementation providing up-to-date media performance class information for tested devices and OS versions.
  • Core Performance Testing - Test doubles for Core Performance.

Bug Fixes

  • Fixed a crash when initializing PlayServicesDevicePerformance found in version 1.0.0-beta2. (b/318803680)

Core and Core-ktx: v1.13.0-alpha03

January 10, 2024

androidx.core:core:1.13.0-alpha03, androidx.core:core-ktx:1.13.0-alpha03, and androidx.core:core-testing:1.13.0-alpha03 are released. Version 1.13.0-alpha03 contains these commits.

API Changes

DataStore: v1.1.0-beta01

January 10, 2024

androidx.datastore:datastore-*:1.1.0-beta01 is released with no changes since 1.1.0-alpha07. Version 1.1.0-beta01 contains these commits.

Fragment: v1.7.0-alpha08

January 10, 2024

androidx.fragment:fragment-*:1.7.0-alpha08 is released. Version 1.7.0-alpha08 contains these commits.

Clean up

Games Performance Tuner 2.0: v2.0.0-beta01

January 10, 2024

androidx.games:games-performance-tuner:2.0.0-beta01 is released with no changes from the last alpha release. Version 2.0.0-beta01 contains these commits.

Graphics Path: v1.0.0-beta02

January 10, 2024

The changes in this release were all about reducing the size of the library, which was larger than necessary due to assumptions made by native code.

androidx.graphics:graphics-path:1.0.0-beta02 is released. Version 1.0.0-beta02 contains these commits.

Bug Fixes

  • Reduced the size of libandroidx.graphics.path.so by 96%. (I71397)
  • Reduce the size of libandroidx.graphics.path.so by 5%. (I2da7c)
  • Shrunk the native components of androidx.graphics:graphics-path by 43%. (I8e40d)

Health Connect: v1.1.0-alpha07

January 10, 2024

androidx.health.connect:connect-client:1.1.0-alpha07 is released. Version 1.1.0-alpha07 contains these commits.

API Changes

  • Return SDK_UNAVAILABLE when #getSdkStatus is called from a profile user context. (I91df3)
  • Remove SleepStageRecord. (/If6ada)

Bug Fixes

  • Throw RemoteException instead of IllegalStateException on binding failures. (Id2233)

Lifecycle: v2.7.0

January 10, 2024

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

Important changes since 2.6.0

  • TestLifecycleOwner now includes a suspending function setCurrentState() which ensures that the state change and all LifecycleObserver callbacks are completed before returning. Notably, unlike setting the currentState property directly, this does not use runBlocking, making it safe to use within a coroutine such as one provided by runTest.
  • The LiveData extensions of map and switchMap now mirror the behavior of distinctUntilChanged - if the LiveData has a value set, the map/switchMap function will be immediately called to populate the value of the returned LiveData. This ensures that the initial value will be set as part of the first composition (when used with observeAsState()), but does not change the observation behavior - updates values from the source LiveData will still only apply once you start observing the LiveData.
  • This release fixes an issue where SavedStateHandle would not properly restore custom Parcelable classes after process death and recreation. Due to type information that is lost by the Android framework, arrays of custom Parcelables require additional work (manually creating a typed array of the right type) and the documentation on get, getLiveData, and getStateFlow now specifically calls this limitation out.
  • The proguard keep rules associated with LifecycleObserver have been removed. This means that proguarded code that wishes to use APIs via reflection (such as using the long since deprecated @OnLifecycleEvent annotation) will need to provide their own keep rules for their specific use case.

Lifecycle Event Observability

  • As an alternative to using a LifecycleEventObserver, you can now observe a Flow of Lifecycle.Event via the Lifecycle.asFlow() extension method.
  • Jetpack Compose users can now use LifecycleEventEffect to run Compose side effects based on Lifecycle.Event.
@Composable
fun HomeScreen(viewModel: HomeViewModel = viewModel()) {
  LifecycleEventEffect(Lifecycle.Event.ON_RESUME) {
    viewModel.refreshData()
  }
  // …
}
  • Jetpack Compose users can use LifecycleStartEffect and LifecycleResumeEffect to handle pairs of events - started to stopped and resumed to paused, respectively. This API mirrors the one found in DisposableEffect and is suitable for cases where the change being made when the state is going up needs to be reversed when going back down.
fun HomeScreen(viewModel: HomeViewModel = viewModel()) {
  LifecycleStartEffect(viewModel) {
    val timeTracking = viewModel.startTrackingTimeOnScreen()
    onPauseOrDispose {
      timeTracking.stopTrackingTimeOnScreen()
    }
}

Lifecycle State Observability

  • The current Lifecycle.State can now be observed via the Lifecycle.currentStateFlow property, which returns a StateFlow where the value is the current Lifecycle.State.
  • Jetpack Compose users can use the Lifecycle.collectAsState() extension to directly expose Lifecycle.State as Compose State. This is equivalent (and a shorter alternative) to lifecycle.currentStateFlow.collectAsState().

Media2: v1.3.0

January 10, 2024

androidx.media2:media2-*:1.3.0 is released. Version 1.3.0 contains these commits.

Important changes since 1.2.0

  • androidx.media2 is now fully deprecated. Use androidx.media3 instead.

Metrics: v1.0.0-beta01

January 10, 2024

The API and functionality of this library has been stable for some time. This release simply pushes the library to beta.

androidx.metrics:metrics-performance:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.

Transition: v1.5.0-alpha06

January 10, 2024

androidx.transition:transition:1.5.0-alpha06 and androidx.transition:transition-ktx:1.5.0-alpha06 are released. Version 1.5.0-alpha06 contains these commits.

Bug Fixes

  • WhenTransitionSeekController.animateToStart() is used, added TransitionListeners will now have onTransitionEnd() called after the animateToStart()'s given Runnable. (Ic6a55, b/307624554)

Dependency Update

  • The Fragment dependency has been updated to 1.7.0-alpha08.

Versionedparcelable: v1.2.0

January 10, 2024

androidx.versionedparcelable:versionedparcelable:1.2.0 is released. Version 1.2.0 contains these commits.

Important changes since 1.1.0

  • Added support for depending on VersionedParcelable from a project using Stable AIDL.

Wear Ongoing & Interactions: v1.1.0-alpha04

January 10, 2024

androidx.wear:wear-phone-interactions:1.1.0-alpha04 is released. Version 1.1.0-alpha04 contains these commits.

API Changes

  • We have added RemoteAuthClient.isRemoteAuthAvailable which checks whether remote auth is available. (Ibc10c)

Wear: v1.1.0-alpha02

January 10, 2024

androidx.wear:wear-remote-interactions:1.1.0-alpha02 is released. Version 1.1.0-alpha02 contains these commits.

API Changes

  • We have added RemoteActivityHelper.isRemoteActivityHelperAvailable which helps check whether the functionality of launching a remote activity is available. (I107a9)
  • We have updated RemoteActivityHelper's constructor to have optional parameter compatible in Java. (I75554)

Wear Compose: v1.3.0

January 10, 2024

androidx.wear.compose:compose-*:1.3.0 is released.

Important changes since 1.2

  • The SwipeToDismissBoxState class, SwipeToDismissValue enumeration, and Modifier.edgeSwipeToDismiss extension function are now each part of the androidx.wear.compose.foundation package, instead of the androidx.wear.compose.material package. This updated architecture allows you to implement gesture handling independently from other design considerations. Material Design workflows, such as applying colors from a configured theme, are handled separately.
  • The SwipeToRevealCard and SwipeToRevealChip classes help you implement the recommended swipe-to-reveal guidance. The SwipeToRevealSample class demonstrates how to use these components.
  • The Chip and ToggleChip classes each use the large shape from the Material theme, which itself has a slightly larger rounded corner radius. In addition, Chip and ToggleChip adjust their height to accommodate content displayed using larger font sizes.

Additional changes

For a more complete set of the changes introduced in version 1.3.0, see the beta01 release notes.

Recommendations for implementation

  • If your app allows users to pan around the screen's content, such as in a map-based app, turn off swipe handling by setting userSwipeEnabled to false in the SwipeDismissableNavHost composable, and include a button that allows users to go to the previous screen.
  • To turn off animations for a position indicator during fade-in and position-change animations within a scrolling list, use a SnapSpec object.
  • While waiting for a media app to load content for playback, show a blank Placeholder composable.
  • To create a collection of expandable items on demand, consider using the experimental ExpandableStateMapping class.

Wear Compose: v1.3.0-rc01

January 10, 2024

androidx.wear.compose:compose-*:1.3.0-rc01 is released. Version 1.3.0-rc01 contains these commits.

Bug Fixes

  • We have updated the MaterialTheme large shape to use a 26dp rounded corner radius and this will now be used by Chip and ToggleChip. This change is needed to support height adjustments when contents need extra height to accommodate large font sizes- otherwise, the existing stadium shape clips some text content.

Text clipped on corners

Figure 1: Text clipped on corners.

Text not clipped

Figure 2: Text not clipped.

This change may cause a breakage in screenshot tests. (I2e6ae)

wear protolayout: v1.1.0-beta01

January 10, 2024

androidx.wear.protolayout:protolayout-*:1.1.0-beta01 is released. Version 1.1.0-beta01 contains these commits.

New Features

The 1.1.0-beta01 release of Wear ProtoLayout indicates that this release of the library is feature complete and the API is locked (except where marked as experimental). Wear ProtoLayout 1.1 includes the following new functionalities and APIs:

  • ArcLine now supports gradient by adding Brush with SweepGradient and having a shadow on the cap to better represent length larger than 360 degrees by adding Shadow on the existing StrokeCap.
  • DynamicInstant has support for zoned date-time formatting. DynamicInstant and DynamicDuration can be used as state or platform data types.
  • Autosizing feature for text size that allows setting multiple sizes to FontStyle.setSizes where the Text size will automatically scale based on the space it has inside of the parent. Additionally, we improved ellipsizing options for text that overflows by adding TEXT_OVERFLOW_ELLIPSIZE and deprecating TEXT_OVERFLOW_ELLIPSIZE_END.
  • Spacer now supports having expanded dimensions with optional weight. For building ExpandedDimensionProp we have added a helper method DimensionBuilders.weight.
  • Support for dynamically hiding and unhiding layout elements with Modifier.visible. This includes having dynamic values in BoolProp.
  • All ProtoLayout APIs now have schema version requirement annotation and version can be checked before calling a newer API.
  • Every element that has Clickable now has its target area extended to at least 48x48 in the renderer to better support accessibility requirements.
  • Following other Material components and Compose initiatives, we have now turned off font padding by default on all Text elements. Additionally, AndroidTextStyle and related setters have been removed from the public API. with following bug fixes:
  • Added a setter for positioning the edge content in EdgeContentLayout so it can be positioned before other content.
  • Consistently throwing an exception when encountering an unrecognized enum value.
  • Invalidate the result of an expression when it yields an invalid numeric value (NaN or infinite) or throws an ArithmeticException.

API Changes

  • Updates to SweepGradient API to allow accepting either colors or ColorStops in the constructor. (I6676f)

Bug Fixes

  • Adding a restricted API and renderer support for setting a direction in which arc elements are drawn. (Idef5a)
  • RoundMode defaults to Floor in FloatToInt32Node when unspecified. The node will still throw an exception if the provided RoundMode is unrecognized. (I1b2d8)

Wear Tiles: v1.3.0-beta01

January 10, 2024

androidx.wear.tiles:tiles-*:1.3.0-beta01 is released. Version 1.3.0-beta01 contains these commits.

The 1.3.0-beta01 release of Wear Tiles indicates that this release of the library is feature complete and the API is locked (except where marked as experimental). Wear Tiles 1.3 includes the following new functionalities and APIs:

  • Module for wear tiles tooling is updated for tile preview support and is set for being published.
  • Support for querying which tiles belonging to the app are active with TileService.getActiveTilesSnapshotAsync.

Webkit: v1.10.0-rc01

January 10, 2024

androidx.webkit:webkit:1.10.0-rc01 is released. This release contains no changes from the 1.10.0-beta01 release.