June 18, 2025

Bug Fixes

  • OnBackPressedDispatcher and NavigationEventDispatcher are now both initialized lazily in ComponentActivity. I710e6

  • Fixed issues with OnBackPressedDistpatcher that caused the following:

    • Only the latest dispatcher an OnBackPressedCallback was added to being notified of its enabled state b/418715930
    • OnBackPressedDispatcher removes the wrong callback when using the addCallback function that takes a lifecycle. b/422714753
    • OnBackPressedDispatcher.remove() does not remove all instances of a registered OnBackPressedCallback. b/423024414

Bug Fixes

  • Added workaround for runtime images causing CompilationMode.None() to not measure worst case performance after first iteration. Unfortunately this workaround requires a delay of 5 seconds to intentionally corrupt the runtime image at the beginning of each macrobenchmark suite I4a4f1.

New Features

  • Added support for Action.MEDIA_PLAYBACK which displays an indicator based on media playback state.
  • Added support for controlling a user’s scroll position upon refresh of the SectionedItemTemplate.

API Changes

  • Add support for saving a user's scroll position within the SectionedItemTemplate between refreshes. Ia4c51
  • Updated MEDIA_PLAYBACK action to enable it for row end action I05cc4
  • Add a new action type I6cc5a
  • Add CarAppExtender#addAction(Action) so that any type of action can be added to the CarAppExtender. Idc4d7
  • Made SectionedItemTemplate accessible for API 8 and above. I9a079

Breaking Changes

  • The background and border modifier nodes now implement SemanticsModifierNode. This can result in new SemanticsNodes added to the semantics tree and, therefore, lead to test failures in tests that make assumptions about the semantics tree structure. For example, tests that use onChild, onParent, onSibling, and other similar methods to make assertions can fail if a new node is added between the current and target nodes. The preferred way to fix these failures is to add a testTag to the target node directly. Another approach is to use a looser matcher, such as onNode(hasAnyAncestor(hasText("ancestor")) and hasText("target")). I638b5

API Changes

  • Rename Modifier.addTextContextMenuComponents to appendTextContextMenuComponents. I4c43f
  • Removed AnnotatedOutputTransformation and carried addStyle functions to TextFieldBuffer. addStyle can still only be called from OutputTransformation. I9930a b/417991824
  • Clickable is rewritten to not use suspend pointer input as an optimization. This feature is enabled by a flag - you can disable if you encounter a bug in the new implementation - ComposeFoundationFlags.isNonSuspendingPointerInputInClickableEnabled. I85b65
  • Introduced isFlingCancellationWithNestedScrollFixEnabled to fix an issue with fling propagation in nested scrolling. In this CL we are restoring the fling continuation behavior removed in aosp/3260391. We will still cancel the fling animation in case the child is removed from composition. I467f4 b/405910180 b/419049142 b/416784125
  • WindowInsetsRulers: changed rulersIgnoringVisibility to maximum. Changed getDisplayCutoutBounds() to be an extension function of PlacementScope. WindowInsetsAnimationProperties has been changed to WindowInsetsAnimation and the getAnimationProperties() has been changed to getAnimation(). I3816f
  • Changed InsetsRulers to be in common code with the name WindowInsetsRulers. Simplified the API so all insets are WindowInsetsRulers. Extracted non-rulers animation properties to an AnimationProperties class. WindowInsetsRulers.innermostOf() can be used to merge multiple WindowInsetsRulers. I2f0c6 b/415012444

Bug Fixes

  • Re-add usage of scrollAnimationSpec in ContentInViewNode. The behavior was removed during the scrollAnimationSpec deprecation which caused use cases to be broken. I1436a b/403301605

New Features

  • Added a center aligned hero carousel component I6f6d3

API Changes

  • Implement XR overrides vertical toolbar Ia1604
  • Added programmatic scroll functions to CarouselState I12f8e
  • Add ComponentOverride for ModalWideNavigationRail I4f440
  • Add ComponentOverride for WideNavigationRail I6354f
  • Create ComponentOverride for HorizontalFloatingToolbar I51116
  • Create ComponentOverride for ShortNavigationBar I30e24
  • SwipeToDismissBoxState references to confirmValueChange have been marked deprecated. Users should instead leverage SwipeToDismissBox API onDismissed callback. Iee780
  • Added userScrollEnabled parameter to Carousel composables. I1d4d2
  • Carousel's currentItem can now be observed from CarouselState. Ie87e9

Bug Fixes

  • Fix an issue where an arbitrary shape on a FAB that is passed to a FloatingToolbar that was not applying its shadow correctly. Icdcc9 b/423336922
  • All Carousels now use the Carousel semantic role by default. I7af12
  • Fixed incorrect thumb movement when the slider state was updated via LaunchedEffect Id9f31 b/302774166

API Changes

  • Make currentWindowAdaptiveInfo() function support large and extra-large window width size classes and promote calculatePosture() and currentWindowDpSize() functions to stable. I92e97

API Changes

  • Added a tooling API for parsing source information added by Compose compiler. Iceaf9 b/408492167
  • SnapshotStateSet now implements Parcelable on Android, it is now supported to be used as part rememberSaveable { ... }. I755dd b/378623803
  • SnapshotStateList now implements Parcelable on Android, it is now supported to be used as part rememberSaveable { ... }. Id18be b/378623803
  • movableContentOf() is now marked with @RememberInComposition annotation, which allows lint to catch incorrect usages I2738d
  • Updated experimental composition observers API to allow for more comprehensive observation of recomposition causes I32b6a
  • Change setDiagnosticStackTraceEnabled to experimental to account for future development of this feature. I11db3
  • currentCompositeKeyHash is now deprecated. Use currentCompositeKeyHashCode instead. The replacement API encodes the same hash with more bits, which exponentially reduces the chance of two random unrelated groups in the composition hierarchy from having the same hash key. I4cb6a b/177562901
  • Projects released with Kotlin 2.0 require KGP 2.0.0 or newer to be consumed Idb6b5
  • @Stable, @Immutable, and @StableMarker have been moved to runtime-annotation (in a compatible way). You can now depend on runtime-annotation if you want to use these annotations from libraries that do not depend on compose. I23a16
  • Renamed the rememberSaveable overload that accepts a KSerializer to rememberSerializable. This change clarifies its intended use with kotlinx.serialization. Supporting general kotlinx.Serializable classes directly in rememberSaveable would require a reified type parameter, which would break source compatibility by requiring all call sites to provide reified type information at compile time. Idb875 I38627 b/376028110

Bug Fixes

  • Compositions that was set with pausable content that was cancelled must be disposed of. This is now checked by the composition and will throw if it is reused. I2daa5 b/406792785
  • Fixed pausable composition to no longer send a spurious onForgotten to remember observers when the pausable composition is disposed of. RememberObservers in a cancelled pausable composition should only be sent an onAbandoned. I26f54
  • Fixed a movable content issue where invalidations that arrive late stages of the processing movable content are added to the composer but these invalidations are not updated when the content is moved causing the content to be recomposed in the wrong place. Icd2fa b/409439507
  • Fixed an issue when movable content was invalidated after it was composed but before it was moved. I99eac b/229001114
  • Calling remove() of a list iterator produced by SnapshotStateList after calling previous() could removed the wrong element from the list and didn't match what the ArrayList does for the same sequence of calls. I05ab7 b/417493222
  • Fixed an ordering issue with the dispatching of onForgotton that could, for example, cause the onDispose of disposable effects to execute in the wrong order. Ic1c91 b/417450712
  • Fix for for reusing state handling in pausable composition Ife96e b/404058957
  • Fixed the reusing state when a composition was paused and restarted but some previously paused state needed to be recomposed because some state it read changed while the composition was paused. I441d1 b/416209738
  • Completed the pausable composition remember dispatch fix for issue b/404058957 previous fix was incomplete. I1afd4 b/404058957
  • OffsetApplier now correctly overrides apply() which was introduced with pausable composition. Not having this could cause pausable composition to throw an exception when updating virtual nodes. Idbf31 b/409291131
  • Fixed a deadlock that may affect Molecule users when a suspended call to FrameClock.withFrameNanos is cancelled while a frame is being dispatched. I89cab b/407027032
  • The Recomposer could go idle with movable content Ie5416 b/409267170
  • The order in which onReuse and onDeactivate could get inverted during pausable composition. They are now guaranteed to occur in order of onDeactivate/onReuse. I996e4 b/404058957
  • Fix dispatching of remember observers in pausable composition to avoid dispatching remembered/forgotten in the same apply I570b2 b/404645679 b/407931790
  • Switched LifecycleRegistry to unsafe mode in Compose Multiplatform to disable MainThread checks and fix threading issues. See CMP-8227 for details. Icee87

External Contribution

  • Fixed a bug affecting Molecule users where using RecompositionMode.Immediate could cause missed recompositions. I9f3a9 b/419527812
  • Exposed PausableComposition isApplied and isCancelled getters which allow for checking the state of the PausableComposition. I994aa
  • Added AnnotationTarget.FUNCTION to the FunctionKeyMeta annotation. I08021

Bug Fixes

  • Flag for isGetFocusedRectReturnEmptyEnabled has been removed now that the feature has been fully verified. Ife722
  • Flag ComposeUiFlags.isGetFocusedRectReturnEmptyEnabled makes it so that when nothing is focusable in a ComposeView, it sets the rect to an Empty value. This prevents a focus search from choosing the View to focus on. This is especially important for when an IME has a NEXT option where it might try to focus on the ComposeViewand requestFocus() fails. Ibd0e2 b/369256395

Breaking Changes

  • The graphicsLayer modifier nodes now implements SemanticsModifierNode. This can result in new SemanticsNodes added to the semantics tree and, therefore, lead to test failures in tests that make assumptions about the semantics tree structure. For example, tests that use onChild, onParent, onSibling, and other similar methods to make assertions can fail if a new node is added between the current and target nodes. The preferred way to fix these failures is to add a testTag to the target node directly. Another approach is to use a looser matcher, such as onNode(hasAnyAncestor(hasText("ancestor")) and hasText("target")). I638b5

API Changes

  • Changed ShadowContext to be a sealed interface I3ce40
  • Adds a cross module way to create an Indirect Touch Event (for testing) I22e4c
  • MakesIndirectTouchEvent.nativeEvent experimental. I6fda5
  • Revises API surface based on API council feedback. Ibf378
  • Remove FrameRateCategory.NoPreference constant. Rename Modifier.requestedFrameRate to Modifier.preferredFrameRate. I2f976
  • WindowInsetsRulers: changed rulersIgnoringVisibility to maximum. Changed getDisplayCutoutBounds() to be an extension function of PlacementScope. WindowInsetsAnimationProperties has been changed to WindowInsetsAnimation and the getAnimationProperties() has been changed to getAnimation(). I3816f
  • Changed class ShadowParams to Shadow I11cca
  • Change the package for frame rate API from androidx.compose.ui.ui to androidx.compose.ui I8994e
  • Changed InsetsRulers to be in common code with the name WindowInsetsRulers. Simplified the API so all insets are WindowInsetsRulers. Extracted non-rulers animation properties to an AnimationProperties class. WindowInsetsRulers.innermostOf() can be used to merge multiple WindowInsetsRulers. I2f0c6 b/415012444
  • Added a tooling API for parsing source information added by Compose compiler. Iceaf9 b/408492167

Bug Fixes

  • Flag for isGetFocusedRectReturnEmptyEnabled has been removed now that the feature has been fully verified. Ife722
  • Fixes a bug in performScrollToNode, which in some cases was not reaching the target node. With this fix, it should always reach the target node in those cases. A side effect of this change is that the exact scroll position at the end of the action may now be different, which affects screenshot tests and tests that make assumptions about the exact scroll position. I2c8a1

New Features

  • Core library has been updated to target Kotlin 2.0 language level and requires use of Kotlin Gradle Plugin 2.0.0 or newer. Idb6b5

API Changes

  • Added NotificationCompat.ProgressStyle and NotificationCompat.Builder.setRequestPromotedOngoing(). See Progress centric notifications and Live Updates for details.

  • Added Parcel.use extension function for safe handling of Parcel resources. I436da

New Features

  • Compose interoperability modules for authoring, brush, and geometry modules

API Changes

  • New Compose interoperability modules and APIs, API cleanup I0e464
  • InProgressStroke.enqueueInputs/updateShape methods which returned kotlin.Result are removed, clients should use e.g. enqueueInputsOrThrow or enqueueInputsOrIgnore instead. InProgressStroke.getNeedsUpdate is renamed to isUpdateNeeded. InProgressStroke.populateOutlinePosition now returns its output parameter to allow call chaining, consistent with other methods in Ink. The TextureBitmapStore interface is moved from the rendering module to the brush module. BoxAccumulator.populateFrom is made to take a nullable immutable Box instead of a mutable BoxAccumulator, to make it clearer what is mutated, callers should change boxAccumulator.add(other) to boxAccumulator.add(other.box). BrushUtil.toBuilderWithAndroidColor/createBuilderWithAndroidColor are removed, use the setAndroidColor of Brush.Builder after constructing instead. Ia7155
  • Previously experimental property InProgressStrokesView.textureBitmapStore is now private. There are still public accessors for this property. I1d706

Bug Fixes

  • Improved performance for custom brushes containing many particles.

API Changes

  • NavEntry.content is now private. To invoke NavEntry content, call the new NavEntry.Content() api which no longer requires a key parameter to invoke. Icd0fd b/420991203
  • NavEntry.key is now a private field. The NavEntry and its relevant states should be identified by the new contentKey field which is generated from the new contentKeyFactory lambda and defaults to a saveable hash generated from NavEntry.key (I81a6c, b/422001357, b/420991203 I2d7d4, b/420991203, b/422841812)

Dependency Changes

  • Navigation3 now depends on the new androidx.navigationevent.compose artifact.

New Features

  • Introduced a new navigationevent-compose module to support Jetpack Compose features in the navigationevent library. 980d78
  • NavigationEvent Compose has added a new LocalNavigationEventDispatcherOwner local composition. It returns a nullable value to better determine whether it is available in the current composition. NavigationEventHandler will now throw an error if the underlying owner is not found. 62ffda
  • NavigationEvent Compose has added a new NavigationEventHandler Composable to handle (predictive back gesture) events. It provides a Flow of NavigationEvent objects that must be collected in the suspending lambda you provide c42ba6 :
NavigationEventHandler { progress: Flow<NavigationEvent> ->
  // This block is executed when the back gesture begins.
  try {
    progress.collect { backEvent ->
      // Handle gesture progress updates here.
    }
    // This block is executed if the gesture completes successfully.
  } catch (e: CancellationException) {
    // This block is executed if the gesture is cancelled
    throw e
  } finally {
    // This block is executed either the gesture is completed or cancelled
  }
}

API Changes

  • Each NavigationEventCallback can now be registered with only one NavigationEventDispatcher at a time; adding it to multiple dispatchers throws an IllegalStateException. Note that this behavior differs from OnBackPressedDispatcher, which allows multiple dispatchers. e82c19
  • Made isPassThrough a val to prevent mutation during navigation, which could break NavigationEvent's dispatching. I0b287

Bug Fixes

  • Fix an issue where annotation values would be incorrectly read when processing native sources with KSP, sometimes missing schema exports. b/416549580
  • Fix a bug where leading comments in a SQL would cause statements to be executed as if they were non-read queries. b/413061402
  • Fix an issue with Room’s Gradle Plugin failing to configure due to the schema directory being empty. b/417823384
  • No longer throw a SQLiteException when obtaining a connection takes too long, instead a log message will be sent by the library. Logging instead of throwing works around iOS suspending loopers causing Room to misinterpret the timeout that occurs in the Kotlin Coroutine acquiring the connection and thus preventing the exception from being thrown when an iOS app is backgrounded and later resumed in the middle of a database operation. b/422448815

Bug Fixes

  • Add missing R8 / Proguard rules to keep JNI / external functions from being obfuscated. b/421626199
  • Fix a bug where leading comments in a SQL would cause statements to be executed as if they were non-read queries. b/413061402

Bug Fixes

  • Fix layout bug in TransformingLazyColumn, where content that fits within the screen is now aligned correctly from the top of the screen I80115
  • Fixed an issue with TransformingLazyColumn where the bottom item was incorrectly scaled when scrolling to the very bottom of a list with an EdgeButton. The scroll progress now follows a gradient descent when restoring the layout. Iea375
  • TransformingLazyColumn now reads the item height inside the background painter, which allows custom TransformationSpecs to implement morphing. I022f0
  • SwipeToReveal now vertically centers the revealed actions correctly. I4419b
  • Fixed a bug in SwipeToReveal that prevented it working correctly with swipe-to-dismiss if both views and compose were in use on the screen. I5dc0e
  • Fixed a bug where SwipeToReveal actions were drawn with a vertical offset when scrolling. I29444
  • AlertDialog, ConfirmationDialog, OpenOnPhoneDialog and SwipeToReveal now round up paddings and sizes that are calculated as a percentage of the screen size. I76367
  • ButtonDefaults.outlinedButtonBorder now updates following enabled/disabled state changes sizeIf2ddd
  • Fixed a bug in EdgeButton height that occurred on complex screens with Pager and ScreenScaffold. I946e3
  • Fixed a race condition that could cause Placeholder animations to stop. I53530
  • Improved HorizontalPageIndicator and VerticalPageIndicator performance by drawing to Canvas. Ifae1e
  • Refined the shape of EdgeButton to smooth the transitions between the ellipsis and circles that make up the outline. I7721e
  • Fixed a bug in LevelIndicator that caused animations to stop, due to unnecessary recompositions. I45d08

Bug Fixes

  • Fix layout bug in TransformingLazyColumn, where content that fits within the screen is now aligned correctly from the top of the screen I80115
  • Fixed an issue with TransformingLazyColumn where the bottom item was incorrectly scaled when scrolling to the very bottom of a list with an EdgeButton. The scroll progress now follows a gradient descent when restoring the layout. Iea375
  • TransformingLazyColumn now reads the item height inside the background painter, which allows custom TransformationSpecs to implement morphing. I022f0
  • SwipeToReveal now vertically centers the revealed actions correctly. I4419b
  • Fixed a bug in SwipeToReveal that prevented it working correctly with swipe-to-dismiss if both views and compose were in use on the screen. I5dc0e
  • Fixed a bug where SwipeToReveal actions were drawn with a vertical offset when scrolling. I29444
  • AlertDialog, ConfirmationDialog, OpenOnPhoneDialog and SwipeToReveal now round up paddings and sizes that are calculated as a percentage of the screen size. I76367
  • ButtonDefaults.outlinedButtonBorder now updates following enabled/disabled state changes sizeIf2ddd
  • Fixed a bug in EdgeButton height that occurred on complex screens with Pager and ScreenScaffold. I946e3
  • Fixed a race condition that could cause Placeholder animations to stop. I53530
  • Improved HorizontalPageIndicator and VerticalPageIndicator performance by drawing to Canvas. Ifae1e
  • Refined the shape of EdgeButton to smooth the transitions between the ellipsis and circles that make up the outline. I7721e
  • Fixed a bug in LevelIndicator that caused animations to stop, due to unnecessary recompositions. I45d08

API Changes

  • Added the Watch Face Push API which allows a Wear OS app to install a watch face on a watch programmatically.
  • The API was previously published as :wear:watchface:watchface-push

Bug Fixes

  • Fix an issue when persisting workers with network requests and default capabilities that would lead to removed capabilities being re-added causing workers with network constraints to misbehave. b/409716532
  • Fix a bug that would cause workers with network constraints to not execute promptly due to constraints not met even though the network and capabilities were available. b/423403088