February 26, 2025

Bug Fixes

  • ViewTree OnBackPressedDispatcherOwners and FullyDrawnReporterOwners can now be resolved through disjoint parents of a view, such as a ViewOverlay. See the release notes of core or the documentation in ViewTree.setViewTreeDisjointParent for more information on disjoint view parents. Ie7750

API Changes

  • Added CameraInfo.getTorchStrengthLevel, CameraInfo.getMaxTorchStrengthLevel and CameraControl.setTorchStrengthLevel to allow customizing the torch brightness I00878
  • A new API CameraController#setTapToFocusAutoCancelDuration has been added so that users can control the auto-cancellation behavior for PreviewView tap-to-focus events. By default, CameraX cancels the focus events after 5 seconds (i.e. camera focus is reset) and this API allows to modify that duration or disable auto-cancellation altogether. Icf59a
  • FLASH_STATE_READY has been renamed to NOT_FIRED and the other FlashState constant names are simplified for better readability. I8771d
  • Exposed Low Light Boost API. Devices running Android 15 or higher can provide support for low-light boost. This feature can automatically adjust the brightness of the preview, video or image analysis streams in low-light conditions. Applications can use the new API to: 1. Use CameraInfo#isLowLightBoostSupported to check the feature availability. 2. Use CameraControl#enableLowLightBoostAsync to enable the mode when the devices can support it. 3. Use CameraInfo#getLowLightBoostState to monitor the low-light boost state. I937ed
  • Add compat classes to allow faster non-camera2 querying in camera-feature-combination-query. Ie97ee
  • For CameraController tap-to-focus events, a new API getTapToFocusInfoState() now exposes the corresponding tap position too by returning a LiveData of TapToFocusInfo class while the previous LiveData<Integer> returning getTapToFocusState() API is deprecated in favor of the new API. I238d2

Bug Fixes

  • Fixed the issue that preview stabilization is not applied when preview stabilization is enabled with Extensions. I24ad7
  • Fixed CameraController focus state event not resetting back to TAP_TO_FOCUS_NOT_STARTED when CameraX auto-cancels a focus event which happens after 5 seconds by default. I31954
  • Fixed preview freeze when using Zero Shutter Lag (ZSL) after multiple captures due to unreleased image resources. Ic3c2a
  • Fixed issues that on some devices UHD videos are red tint when pipeline involves OpenGL. Idcedc

Bug Fixes

  • Added a new semantics property InputText that captures a textfield's value before output transformation is applied. Iae46a b/395911609 b/176949051
  • Removed deprecated AutoSize overloads. Please use the TextAutoSize APIs serving the same function. I2c90f
  • Fixed a caching issue with TextAutoSize where a second layout pass with the same constraints could result in using the second-biggest fitting font size instead of the biggest. Id367f

API Changes

  • Rename DragHandle’s setting fields in the default state; separate pressed and dragged states; make the default sizes be public. I787b9
  • Updates to the TowRowsTopAppBar API. Removed the expanded lambda parameter and added separate parameters for the expanded and collapsed heights. Idd677 b/306697446 b/229134133 b/268068946

Bug Fixes

  • The bottom app bars now observe the touch exploration service (e.g., TalkBack) and keep them visible whenever the service is on. I4b34d

API Changes

  • Moved enableAccessibilityChecks() API that turns on the Accessibility Checks for Android to separate packages which are compose:ui:ui-test-accessibility if you're not using the TestRule and compose:ui:ui-test-junit4-accessibility when calling on TestRule I547ef b/391560768
  • Added a new semantics property InputText that captures a textfield's value before output transformation is applied. Iae46a

Bug Fixes

Important changes since 1.2.0

New Features

  • Adds support for page up, page down, move home, and move end key events .14719d3
  • Adds demos of RecyclerView in aCoordinatorLayout with a collapsing app bar and PreferenceScreen in a CoordinatorLayout with a collapsing app bar. fca56e0 I4c679

Bug Fixes

  • Fixes up, down, spacebar and key variation keyboard actions with NestedScrollView in a CoordinatorLayout. I216f4
  • Fixes keyboard down properly collapsing App Bar when a recyclerview is used within a CoordinatorLayout. I7eac4

androidx.core:core-viewtree:1.0.0 has been promoted to its first stable release with no changes since its previous RC version.

This library introduces the concept of a View being able to have a disjoint parent. A disjoint parent of a view is a separate View object that acts as the view’s parent, but is not set via the View.parent property. Examples of Views with disjoint parents are ViewOverlays, popups, and dialogs, which all appear outside of the main view hierarchy. A View can only have a disjoint parent if it does not have a direct parent via the platform’s View.parent property. Currently, androidx only sets the disjoint parent for ViewOverlays created by Transition 1.6.0-alpha01 and higher. You can also specify your own disjoint parents for views. See the documentation for more information.

Bug Fixes

  • Resolved a FileNotFoundException issue in OkioStorage encountered at app startup. If the initial file read attempt is unsuccessful, a second attempt will be made in case a race condition has occurred due to the file being created by a different process during the initial read. I43b3f b/337870543

API Changes

  • Make Metadata constructor internal (I1fb8f
  • Removed experimental annotation for feature availability API. I5b54f
  • Introduce Metadata factory methods I8418b
  • Make recording method mandatory when creating Metadata objects I3a13e
  • Make device type mandatory when creating Device objects Ibc325

Bug Fixes

  • Fixed missing descriptions from planned exercise steps and blocks. I84039
  • Update java doc for blood pressure value limits. I8d3d4
  • For Android U and higher, Jetpack's validation for blood pressure record values has been replaced with the platform's validation. I08bf5
  • Add contributing data origins for bucketed results on Android U and above. Ie7651

API Changes

  • Introduce MetadataTestHelper#populatedWithTestValues to use in tests after metadata changes introduced in androidx.health.connect:connect-client:1.1.0-alpha12 I1f7f1
  • Removes ExperimentalTestingApi annotation in connect-testing I97a57
  • Adds full stubs for records and changes in FakeHealthConnectClient I15a4c

New Features

  • Proguard minification is now supported for Jetpack XR code

Bug Fixes

  • Additional fixes to support Proguard minification for Jetpack XR SceneCore I4f47e
  • Updated Jetpack XR Scenecore ProGuard rule to prevent AbstractMethodError for minified clients. I91a01

New Features

  • ListDetailPaneScaffold and SupportingPaneScaffold use SpatialPanels by default when using EnableXrComponentOverrides I166b0

API Changes

  • DefaultNavigationRailOrbiterProperties and DefaultNavigationBarOrbiterProperties getters are no longer@Composable I61618
  • LocalNavigationRailOrbiterProperties and LocalNavigationBarOrbiterProperties are no longer nullable I61618

Bug Fixes

  • Fixed a bug where routes with wildcard paths do not match with an added deeplink. I7ea92 b/389970341
  • NavDeepLink matching has been fixed where a deeplink and a deeplink request have to match exactly on uri, action, and mime. Matching is no longer allowed if only one or two fields match. I3227f b/395712033

Known Issues

  • Due to the work to address b/395712033, deeplinks are incorrectly required to have all of the same fields as the deeplink request and/or the Intent. Deeplinks should only be required to match the fields that they have, and the non-included fields should be ignored. This has been fixed for a later release as part of b/399826566.

Bug Fixes

  • Fixed an issue where attempting to saveState with non-inclusive pop would result in a null savedState that could cause a crash on restoration. I9f3e8 b/395091644
  • From Navigation 2.8.8: NavDeepLink matching has been fixed where a deeplink and a deeplink request have to match exactly on uri, action, and mime. Matching is no longer allowed if only one or two fields match. I3b029 b/395712033
  • From Navigation 2.8.8: Fixed a bug where routes with wildcard paths do not match with an added deeplink I7ea92 b/389970341

External Contribution

  • Extract a navigation-common, navigation-runtime, and navigation-compose APIs to the common platform. Thanks Konstantin Tskhovrebov! I1e626 Ica76f Idf479

Known Issues

  • Due to the work to address b/395712033, deeplinks are incorrectly required to have all of the same fields as the deeplink request and/or the Intent. Deeplinks should only be required to match the fields that they have, and the non-included fields should be ignored. This has been fixed for a later release as part of b/399826566.

New Features

  • The PdfViewerFragment now supports StylingOptions (a set of style resource ids) enabling custom styling via newInstance or XML (FragmentContainerView). Subclasses can utilize the protected constructor for similar functionality.
  • StylingOptions currently takes in containerStyle which provides:
    • Custom drawable support for the fast scroll handle and page indicator.
    • marginEnd attribute for precise positioning of the fast scroll handle and page indicator.

API Changes

  • Added public attrs from PdfView I30fc5
  • Added new APIs StylingOptions for pdf view. Id2993

Bug Fixes

  • Fixed synchronization discrepancy between the fast scroll handle and page indicator visibility state.

New Features

  • You can now create ‘shared UI’, i.e. UI that can have elements that are client-owned and provider-owned. Shared UI can be hosted using SharedUiContainer, which extends ViewGroup. New APIs utilize the concept of session management similar to that of SandboxedSdkView and SandboxedUiAdapter.
  • All APIs added in this release are behind the SharedUiPresentationApi @RequiresOptIn flag.

API Changes

  • Added session management and asset registration APIs to SharedUiContainer. Session management is implemented using SharedUiAdapter introduced in the same release. Ic60b0
  • Added SharedUiContainer that can host client-owned and provider-owned UI. It places all of its child views in the top left corner. Ia7310
  • Added backwards compatibility support for SharedUiAdapter. I56d7a
  • Added SharedUiAdapter for session management of View containers that can host client-owned and provider-owned UI. Session management logic is similar to that of SandboxedUiAdapter. I501f6

Bug Fixes

  • Compute viewability when onVisibilityAggregated is called. I91c69

Known Issues

  • When placed inside a PoolingContainer, SharedUiContainer closes the session on window detachment.

New Features

  • @PrivacySandboxInterface-annotated interfaces can now extend the SharedUiAdapter interface introduced in androidx.privacysandbox.ui:ui-core:1.0.0-alpha14, similarly to SandboxedUiAdapter. An interface may only extend one UI adapter type.

Bug Fixes

  • Fix an issue where Room would not be setting the busy_timeout in the initial database connection that would lead to SQLException: Error code: 5, message: database is locked issues I93208 b/380088809.
  • Fix an issue in Room’s compiler that would cause the KSP processor to crash when processing native source sets (such as iOS) on Kotlin 2.1.x and KSP1 I883b8 b/396607230.

New Features

  • Add fallback for built-in types, ensuring that all types supported by Bundle can be used with encodeAsSavedState/decodeFromSavedState by default or, for properties in @Serializable classes, via the @Contextual annotation. Ic01d2
  • Include support for classDiscriminator and classDiscriminatorMode on SavedStateConfig. I69b66 b/395104517

API Changes

  • Add SavedStateConfig parameter to saved() delegates I39b3a
  • Makes built-in serializers singleton objects Ifeee4
  • SavedStateConfig properties are now public, enabling other modules to use these configurations. Ie5f49 b/378897438
  • Support @Serializer(with = ...) for MutableStateFlowSerializer and MutableStateSerializer I90953
  • Add contentDeepToString to SavedStateReader I14d10

Bug Fixes

  • Fix the Gradle Metadata of the androidx.sqlite artifacts for JVM that would cause JVM projects to resolve the Android variant and would lead to NoClassDefFoundError: androidx/sqlite/SQLiteDriver (b/396148592 and b/396184120).

API Changes

  • Make SwipeToRevealDefaults public. I0c34c
  • We have replaced the swipeToDismissEdgeZoneFraction parameter in HorizontalPager. Instead a new parameter, gestureInclusion has been introduced which can be used to achieve necessary swipe to dismiss behaviour. gestureInclusion takes in an instance of GestureInclusion which decides whether the subsequent scroll event should proceed or not. Allowing a gesture means that the Pager consumes it - otherwise, it will be handled elsewhere such as by a swipe-to-dismiss handler. The new default behaviour is to disallow gestures on the leftmost edge of the first page in the Pager, and hence allow swipe to dismiss in this region. All other pages will permit the Pager to consume all gestures, meaning Swipe to dismiss cannot be triggered from them. To achieve Swipe to dismiss behaviour on all pages, simply provide a custom GestureInclusion instance (see PagerDefaults.disableLeftEdgeOnFirstPage) that ignores the current page. Another breaking change introduced here is that the Pager component is no longer full screen by default, instead add Modifier.fillMaxSize() to achieve this behaviour. I9d3aa
  • We have renamed createAnchors to createRevealAnchors in the swipe-to-reveal APIIf5999
  • We have removed RevealScope from the swipe-to-reveal API. Ie4ad5
  • We have removed Revealing and Revealed from RevealValue in the swipe-to-reveal API. I8dbc5
  • We have renamed SwipeDirection to RevealDirection in the swipe-to-reveal API. I7472f
  • We have changed the signature of the positionalThreshold parameter of SwipeToReveal's rememberRevealState function. I29c0a
  • We have added a new overscrollEffect parameter added to ScalingLazyColumn, TransformingLazyColumn and ScreenScaffold. I0cee8
  • When using PagerDefaults#snapFlingBehaviour, the pagerSnapDistance parameter has been replaced with an Int parameter maxFlingPages, which can be used to specify the max number of pages the Pager should fling. I8cfc0
  • Wear Pager now has its own PagerScope instead of using Compose Foundation PagerScope. I9195b
  • We have added support for lineHeight on Curved text I1c936
  • We have added initialAnchorItemIndex and initialAnchorItemOffset to TransformingLazyColumnState and rememberTransformingLazyColumnState to that the initial scroll position can be specified in TransformationLazyColumn. I0a0d5
  • Deprecate runWithTimingDisabled in favor of runWithMeasurementDisabled, which more clearly describes the behavior - all metrics are paused. Additionally, expose the MicrobenchmarkScope superclass since redeclaring the runWithMeasurementDisabled function to open access isn't possible, since it's inline. I9e23b b/389149423 b/149979716
  • We have added TransformingLazyColumnItemScrollProgress.Unspecified to the API to avoid boxing on TransformingLazyColumnItemScrollProgress. I0835d

Bug Fixes

  • Improve Kdoc for CurvedTextStyle Id45e3
  • We have made SwipeableV2 (part of the SwipeToReveal implementation) internal instead of public but restricted to library group. Idbb94
  • We have added tests to HierarchicalFocusCoordinator I1ce54 b/395548918
  • We have made improvements to SwipeToReveal in wear compose foundation samples. I5f307
  • Fix scroll axis semantic data for verticalScrollAxisRange in TransformingLazyColumn for accessibility I68123
  • Improve performance of rotary haptics on Wear4+ by removing unnecessary background threads I39cfe
  • Change SwipeDismissableNavHost to use PredictiveBackNavHost only on API 36 onwards. I59bed
  • We have added a guard against a crash when accessing the reducemotion setting. I01e2c
  • We have implemented prefetching for TransformingLazyColumn to reduce jank Icca88

API Changes

  • We have removed the label parameter from SwipeToRevealScope's primaryAction and secondaryAction. Custom action semantics should be added to the content of the SwipeToReveal component directly, by the developer. Ia67f3
  • We have removed the 'Button' prefixes from sizes, text styles and color functions in IconToggleButtonDefaults and TextToggleButtonDefaults I5471d
  • We have removed the experimental LocalMinimumInteractiveComponentEnforcement I4ad8a
  • We have replaced the PickerGroupScope DSL with a composable. As such, we removed the pickerGroupItem method from PickerGroupScope, and instead added @Composable PickerGroupItem that should be used to add a Picker to PickerGroup. We also updated the type of PickerGroup 'content' parameter to @Composable PickerGroupScope.() -> Unit. Ic6aec
  • We have added a LevelIndicator overload for fractional values and added a Stepper prefix to those overloads that include a range parameter (which are suitable for use with the Stepper component). If4234
  • We have added TransformingLazyColumn’s TransformationSpec to the API, which allows the definition of the exact transformations happening to the items as they are being scrolled through the TLC. I21856
  • We have updated IconButtonShapes, IconToggleButtonShapes, TextButtonShapes and TextToggleButtonShapes to be consistent with the compose/material3 classes I5a081
  • We have added an overscrollEffect parameter added to ScalingLazyColumn, TransformingLazyColumn and ScreenScaffold. I0cee8
  • We have renamed the swipeDirection parameter to revealDirection in rememberRevealState. I7472f
  • Wear Pager now has its own PagerScope instead of using Compose PagerScope. I9195b
  • We have removed the LinearProgressIndicatorContent composable, please use LinearProgressIndicator directly so that changes to values are animated by default. I2c4ad
  • We have removed the CircularProgressIndicatorStatic composable and added a public DrawScope function drawCircularProgressIndicator with the same functionality. Please use CircularProgressIndicator directly so that changes are animated by default, but build your own composable from drawCircularProgressIndicator if custom animations are needed. Ie762f
  • We have reordered the parameters in DrawScope.drawCircularProgressIndicator to move up the targetProgress parameter. I8ab92
  • The OpenOnPhoneDialog api was updated for better clarity and consistency with other Dialogs. The show parameter was renamed to visible and curvedText is now provided by the caller instead of having a default value. Idec2d
  • We have renamed openOnPhoneCurvedText to openOnPhoneDialogCurvedText I65bdd
  • We have added ScrollIndicatorColors for providing custom colors to ScrollIndicator. I9eb8c
  • Allow the configuration of the color used to draw a background behind TimeText. I9f5d9
  • Updated ArcLarge, ArcMedium and ArcSmall typographies to be CurvedTextStyle Iffc41
  • We have removed ScreenScaffoldDefaults.contentPaddingWithEdgeButton. Ia923e
  • We have added errorDim to the ColorScheme, for high priority errors or emergency actions such as safety alerts, failed dialog overlays or stop buttons. I70998

Bug Fixes

  • We have pinned wear.compose.material3 to version 1.15.0 of androidx.core.core I132e9
  • We have improved Dialog's performance by using the AppScaffold to layer dialogs over other screen content I1b9a4
  • Reduced EdgeButton's internal vertical padding. I1a5bb
  • We have added Button semantics to Slider buttons. I80cc6

New Features

  • Added experimental modifiers for enterTransition and exitTransition I4a4d6
  • We have added additional platform binding to receive the visibility status of full layout, whenever it's changed. I250c3
  • Allow injecting testing app state and platform data into LayoutElementAssertionsProvider for evaluating dynamic values. Ib5fcb
  • Add corner filters to the protolayout testing library Ie2361
  • ButtonColors, CardColors and ProgressIndicatorColors now support copy method, with optional override of some parameters. Ie2054

API Changes

  • Add dynamic data binding support to the testing library Ib98de
  • Fix imageButton when used with backgroundImage function by removing overlay. Additionally, allow for backgroundImage function to allow specifying null for overlay color, meaning that overlay won't be applied. Ibec3c

Bug Fixes

  • Changed default hasValueOfType method to throw UnsupportedOperationException instead of IllegalArgumentException. Ia36c3
  • Default color token values are update to reflect the latest spec. I75d44
  • Fixes for aliasing issue visible on arc lines in AndroidX tiles renderer. I88190

Important changes since 1.0.0

  • This version contains crucial bug fix for Apps running on Wear OS 5 (API level 34) or higher and targeting API level 35 or higher.
  • Apps should update to this version of the library before updating their targetSdkVersion to 35 or higher.
  • Otherwise, runtime exception will be thrown.
  • A new definition for paired device type - none, when the device is not paired with the phone, has been added.