Important changes since 1.9.0
PhotoPickernow allows picking images in order and choosing which tab (either albums or images) should be initially visible.- The
PickVisualMediaandPickMultipleVisualMediaActivity Result contracts that trigger the Photo Picker no longer directly delegates to Google Play services if the system Photo picker is not available, but uses the publicACTION_SYSTEM_FALLBACK_PICK_IMAGESaction and related extras to provide a consistent Photo Picker experience to OEMs and system apps as a fallback. - New
LocalActivitycomposition local that provides theActivityfor the current scope, removing the need for developers to get anActivityfrom theLocalContext.
New Features
AppSearchmodule enters Beta.
API Changes
- Disable experimental
AppSearchdelete propagation API due to stability issues. Iea386 - Create
GlobalSearchApplicationInfoAPI, an experimental and optional way for producers and consumers to indicate interest in certain types. I116fd - Minor changes to experimental AST (query builder) APIs Ibd852
Bug Fixes
- This library now uses JSpecify nullness annotations, which are type-use. Kotlin developers should use the following compiler argument to enforce correct usage:
-Xjspecify-annotations=strict(this is the default starting with version 2.1.0 of the Kotlin compiler). Ic2976 b/326456246 - Adds required permission to
searchPersonCorpusI4431d
API Changes
- Add
VideoCapture.getSelectedQuality()to know the selected Quality based on theQualitySelector. I70508 b/204288986 - When an image capture is invoked with the
ImageCapture.OnImageCapturedCallbackAPI, the ImageInfo at the returnedImageProxycan now be used to know whether flash was fired through the newImageInfo.getFlashState()API. Id2c61 b/380527406 - Added
OUTPUT_IMAGE_FORMAT_NV21output format support forImageAnalysis. I484ab - Remove the experimental annotation of the
featurecombinationqueryartifact I4427f - Adjust the zoom ratio range allowed for
CameraControlby Extensions-specific characteristics when an extensions mode is enabled. I85af1
Bug Fixes
- Upgraded
compileSdkas 35 for using Android 15 related API. Apps using CameraX libraries will also need to upgrade theircompileSdkconfig setting. Ic80cd - This library now uses JSpecify nullness annotations, which are type-use. Kotlin developers should use the following compiler argument to enforce correct usage:
-Xjspecify-annotations=strict(this is the default starting with version 2.1.0 of the Kotlin compiler). Idc6c6 b/326456246
New Features
- Upgraded
compileSdkas 35 for using Android 15 related API. Apps using CameraX libraries will also need to upgrade theircompileSdkconfig setting. Ic80cd - This library now uses JSpecify nullness annotations, which are type-use. Kotlin developers should use the following compiler argument to enforce correct usage:
-Xjspecify-annotations=strict(this is the default starting with version 2.1.0 of the Kotlin compiler). I7bcd7 b/326456246
- This is the first RC that includes the fix for CVE-2024-10382 patched on beta03. If you are using a lower version than 1.7-beta03, please update to use this version.
Bug Fixes
- Fixed incorrect placement animation from
animateBoundsinLazyGriddue toMotionFrameOfReferencePlacementbeing reset. 16193b - Fixed intrinsic query in
SharedTransitionLayoutby redirecting the intrinsic query to lookahead pass from a top-level lookahead root. a07d12 - Added missing
@paramtags in docs. e5cf67
API Changes
- AutoSize: Renamed
AutoSizetoTextAutoSizeand published APIs that enable creating customTextAutoSizeimplementations. SeeTextAutoSizeSamplefor an example of a custom text auto size implementation. I85756 - Moved the
DetectTapGesturesEnableNewDispatchingBehaviorfeature flag toComposeFoundationFlagsand renamed it toisDetectTapGesturesImmediateCoroutineDispatchEnabled. The old flag is deprecated and will now delegate toComposeFoundationFlags.isDetectTapGesturesImmediateCoroutineDispatchEnabledinstead. I62932
Bug Fixes
- Enabled
DetectTapGesturesEnableNewDispatchingBehaviorby default.TapGestureDetectorAPIs now use the new dispatching behavior (immediate dispatch) by default. I9f2bc b/369648479 - Fixed the
requiredWidth/Height/Sizemodifiers to properly handle intrinsic sizes. Ie3d7d b/368113212
External Contribution
Bug Fixes
- Adds
displayCutoutto the group of insets that Material components take into account by default, to avoid content overlapping with the display cutout.- This is a behavior change that will impact how inset-aware components behave around a display cutout. This includes the default value of the
WindowInsetsparameter for inset-aware Material 3 components, and theWindowInsetsvalues provided in the component. - Defaults objects for both Material 2 and Material 3. If this change causes undesirable behavior, manually specify the
WindowInsetsparameter on a per-component basis. I43ee9 b/362508045
- This is a behavior change that will impact how inset-aware components behave around a display cutout. This includes the default value of the
- The activity that is used as the host for the composable under test when using
ComposeContentTestRule.setContentnow uses the themeTheme.Material.Light.NoActionBar, to avoid theActionBarfrom overlapping with test content when targeting SDK 35. To opt out of this behavior, you can remove the dependency onui-test-manifestand add an activity entry in your test app'sAndroidManifest.xmlforComponentActivitywith the theme of your choice. I7ae1b b/383368165
External Contribution
- Expose
sheetGesturesEnabledinModalBottomSheetLayout. I3f032 b/329543529
Behavior Change
- Added
displayCutoutto the group of insets that Material components take into account by default, to avoid content overlapping with the display cutout. This is a behavior change that will impact how inset-aware components behave around a display cutout. This includes the default value of theWindowInsetsparameter for inset-aware Material 3 components, and theWindowInsetsvalues provided in the component Defaults objects for both Material 2 and Material 3. If this change causes undesirable behavior, manually specify theWindowInsetsparameter on a per-component basis. I43ee9 b/362508045
API Changes
- Updates to the
TopAppBarAPI. Rename the medium and large top app bars with a subtitle to*FlexibleTopAppBar. Unified the color variations into a singleTopAppBarDefault.topAppBarColors()function, and added asubtitlecolor parameter to be applied for a provided subtitle Composable I41b65 - Remove
WideNavigationRailArrangementAPI in favor ofArrangement.VerticalId0341 - Add a new
VerticalSlider @Composable. I2bfba - Add a new Track
@Composablethat allows specifying custom external track corners and track icons. I436a4 - Update the floating toolbar APIs to use the
FloatingToolbarColorsobject instead of a single container color. I9a054 - Add and use new experimental annotation
ExperimentalMaterial3ComponentOverrideApiIa1eaf Modifier.indicatorLinenow takes a shape for the text field to handle clipping. I8c5f3 b/380704151- Rename the experimental
FloatingAppBarfunctions toFloatingToolbarI1dbf8 - Added a new
floatingToolbarVerticalNestedScrollthat can be attached to a scrollable container to update the floating toolbar expansion state based on a scroll motion that crosses a threshold. I6d65f - Introducing a new API for creating a floating toolbar with an attached Floating Action Button (FAB). The API provides flexible customization options, allowing you to arrange the toolbar horizontally or vertically and place the FAB at the start or end of the toolbar. I9e350
Bug Fixes
- Fix a Snackbar accessibility issue that caused it to announce itself on dismiss when
TalkBackis on. /I9db53
External Contribution
- Commonized
BasicTooltipin foundation andBasicTooltip/Tooltipin material3. Ifc2e6
API Changes
- Add and use new experimental annotation
ExperimentalMaterial3AdaptiveComponentOverrideApi. Id45aa - Hide
ThreePaneScaffoldHorizontalOrder.toLtrOrder. I6f8d2 ThreePaneScaffoldPredictiveBackHandlerhas been made public. I1a995 b/370543873- Added
isPredictiveBackInProgressproperty toThreePaneScaffoldState. I1a995 b/370543873 - Create overriding mechanism for
AnimatedPaneto support sideloading implementations for different form factors. Id7622
Bug Fixes
- Fix the issue when the settling direction has no anchors. df8257d
API Changes
- Making
AutofillManageran abstract class. I0a3b0 - Fixed several focus-related issues, including crashes when IME tries to focus on
ComposeViewwithout focusable items, focus change within childAndroidViews, and focus request leaving anAndroidView. Ia03c3 b/369256395 b/378570682 b/376142752 - Change
FocusEnterExitScope.cancelFocus()tocancelFocusChange()I89959 - You may now calculate Composable occlusions with
RectInfo.calculateOcclusions(). - Added extension function on
DelegatableNodeto register a listener for global layout changes. I68b59
Bug Fixes
- The activity that is used as the host for the composable under test when using
ComposeContentTestRule.setContentnow uses the themeTheme.Material.Light.NoActionBar, to avoid theActionBarfrom overlapping with test content when targeting SDK 35. To opt out of this behavior, you can remove the dependency onui-test-manifestand add an activity entry in your test app's AndroidManifest.xml forComponentActivitywith the theme of your choice. I7ae1b b/383368165 - Resource fonts with the same variation settings will now avoid over-caching causing the incorrect variation settings to be applied. If3dff b/372044241
AnnotatedString.fromHtmlnow supports<ul>/<li>tags. I7c2fe b/299662276 b/139326648
External Contribution
- Added a new Clipboard interface and a composition local for it. I80809
Bug Fixes
- This library now uses JSpecify nullness annotations, which are type-use. Kotlin developers should use the following compiler argument to enforce correct usage:
-Xjspecify-annotations=strict(this is the default starting with version 2.1.0 of the Kotlin compiler). I9ab25 b/326456246 - App Bar now properly collapses with Keyboard down when using a
recyclerviewinside aCoordinatorLayout.
New Features
- A version bump release along with small implementation updates
API Changes
- Add
@Deprecatedannotation forIdentityCredentialto keep consistent with framework. I6ac90 b/140252778 b/217942278 b/251211046 b/239955609
External Contribution
- Deprecate
BuildCompat.isAtLeastV. Callers should check SDK_INT against 35 directly instead. I294d1
API Changes
- Update HEIC XMP handling to prefer XMP data from a separate segment in the file, rather than tag 700 in the Exif data.
Bug Fixes
- Fix
ExifInterface.getThumbnail*()method to work correctly after a call tosaveAttributes()(previously the calls would succeed, but the result would be incorrect/undefined) - Fix PNG XMP handling to read and write the separate iTXt XMP chunk instead of tag 700 inside the eXIf chunk.
- Fix
WebPimage corruption when handling image files with trailing non-WebP data. b/385766064.
Bug Fixes
- Better documented newly added locale-related functionality.
- Added backing types to all enumeration types.
New Features
- Updated background and history read permissions to support Android 13 and below.
API Changes
- Added inline reified overloads for
HealthPermission.getReadPermissionandHealthPermission.getWritePermissionI59a2e
Bug Fixes
- Remove legacy permission methods Ifd080
- This library now uses JSpecify nullness annotations, which are type-use. Kotlin developers should use the following compiler argument to enforce correct usage:
-Xjspecify-annotations=strict(this is the default starting with version 2.1.0 of the Kotlin compiler). Iaf73a b/326456246 - Fixed documentation for
HealthPermission.READ_HEALTH_DATA_HISTORY, specifically by pointing out that reads without this permission only fail when attempting to read a single data point. Id5b5a
Bug Fixes
- This library now uses JSpecify nullness annotations, which are type-use. Kotlin developers should use the following compiler argument to enforce correct usage:
-Xjspecify-annotations=strict(this is the default starting with version 2.1.0 of the Kotlin compiler). Icdd6c b/326456246 - Fixed b/372391363 releasing buffer queues in the correct order to fix CTS failure.
- These libraries add a set of platform compatibility mechanisms intended for androidx internal use only. These libraries are used as implementation dependencies only.
Important changes since RecyclerView 1.3.2
Adaptiverefresh rate support:RecyclerViewnow callssetFrameContentVelocitywhen it is scrolling viaOverScroller(such as settling from a fling or smooth scroll). I8f8a4
API Changes
- Cleanup lazy layouts from tv-foundation. Refer to 1.0.0-alpha11 release notes to migrate away from tv-foundation lazy layouts. I2fdd3 b/358913893
API Changes
- Change
FocusEnterExitScope.cancelFocus()tocancelFocusChange()I89959 FocusProperties.enterandFocusProperties.exithave been replaced withonEnterandonExit, respectively,using a receiver scope instead ofFocusDirectionparameter. I6e667
Bug Fixes
- Moved
CompositingStrategy.OffScreenfrom Surface to Text for fixing the jittery text while scaling. I92b15f17 - Fixed broken focus management in Carousel Ie508b721375
- Surface (non-interactive) has a simplified implementation as compared to the interactive ones. I7ea545150
API Changes
- We have updated all Wear Compose libraries to ‘explicit API’ mode. Iebf9f
- We have made the pager’s snap animation parameter part of
PagerDefaults. Ifff64 - We have added an offset parameter was to
SwipeToDismissBoxState. I586bd
Bug Fixes
- Rotary platform haptics are now called for Wear OS versions after V Idb03e
API Changes
- We have updated all Wear Compose libraries to ‘explicit API’ mode. Iebf9f
- We have updated the
ScreenScaffoldandEdgeButtonAPIs, so that it is easier to specify content paddings on screens that include anEdgeButton. In the new API theEdgeButton'ssizeis only passed to theEdgeButton, and theScreenScaffoldtakes anedgeButtonSpacingparameter for the spacing betweenEdgeButtonand list content. I424fd - In
DatePicker, we have renamed parametersminDatetomaxDate, andminValidDatetomaxValidDate. InDatePickerColors, we have renamed parameterselectedPickerContentColortoactivePickerContentColor, andunselectedPickerContentColortoinactivePickerContentColorIba17b - We have updated the
ArcProgressIndicatordefaults tostrokeWidth=6dpand recommendeddiameter = 81.24%of screen height I6f248 - We have updated the Confirmation API to reflect its usage as a dialog. The composable is now called
ConfirmationDialog, with associated updates to the naming of colors and defaults classes. We have also renamed theshowparameter tovisiblefor compatibility with other Compose animation APIs. In addition, we have madeConfirmationDialogContent,SuccessConfirmationDialogContent,FailureConfirmationDialogContentavailable for situations where developers need to customize the intro/outro dialog animations. Iaeb33 - We have updated
CircularProgressIndicatorContenttoCircularProgressIndicatorStatic(the non-animated variation ofCircularProgressIndicator) so that it can now be used to buildCircularProgressIndicatorwith custom animations. I1346f - We have fixed the parameter ordering on the
ArcProgressIndicator, putting the modifier parameter first I4656a - Improved the
SwipeToRevealAPI to receive a text slot parameter for the labels of the actions (except secondary action) and to remove label parameters from undo action I5b3db
Bug Fixes
- We have fixed a bug where
LongPresshaptics were triggered more than once inButton,Card,IconButton,TextButtonIa8b0f - Changes to the UX of
AlertDialog- on large screens the confirm and dismiss buttons are now smaller. There is also increased spacing below the confirm and dismiss buttons. I4f066 - We have changed the animation specs of the action button label of the
SwipeToRevealcomponent. Ib87fb - Changed
SwipeToRevealto expand the container at the same time that the text is displayed. I44cf8 - Improved
SwipeToRevealto perform haptic feedback when the swipe passes the threshold where the primary action is committed. I23efe - We have updated
SwipeToRevealto display ellipsis on text overflow by default, for primary and undo actions. I71f5a - We have fixed an issue causing jitter on
ButtonGroupanimations. I63f8f - We have added text semantics to
AnimatedTextI6063c - Dialog now resets background scaling when the dialog is removed from the composition (without this fix, the launching screen may have been left in a scaled down state) Id24ac
- We have added a shape morph animation to the buttons in the Stepper component Id6ed3
New Features
LayoutColorto support both static and dynamic color types I4c89b- Added
ProtoLayout Material3textButton component. Id680d - Add
iconButtonProtoLayout Material3 component. Ica3f0 - Added ProtoLayout Material3 button container component. I17a38
- Added support for Chainable semantic modifiers to protolayout-material3 I4af62
- Added ProtoLayout Material3 single segment
CircularProgressIndicatorI2c8a2 - Added
padding,metadatamodifiers I8720a - Added
background,clipandclickablemodifiers I35478 - Add
LinearGradientto Brush and allow it to be used in the Background Modifier. Ic4dea - Add small size for appCard and
titleCard. I91f98 - Added ProtoLayout Material3
graphicDataCardcomponent. I92be7 - Added ProtoLayout Material3
iconDataCardandtextDataCardcomponents. I4e1e4 - Added ProtoLayout Material3
appCardcomponent. Id4c57 - Abstract
EdgeButtonColorstoButtonColors. I83624 - Added ProtoLayout Material3
titleCardcomponent. I2dc72
API Changes
- ProtoLayout Material3 API now accepts
LayoutStringto support both static and dynamic texts. I9c24a
Bug Fixes
API Changes
- Renamed
processRecentInteractionEventstoonRecentInteractionEventsmethod. Iec3d5
New Features
Watch faces commonly allow the user to select colors using a ListUserStyle. While this works, it entails sending the icons over bluetooth to the companion editor which is inefficient, so we’ve introduced ColorUserStyleSetting where the payload is a list of one or more color per style which has a significantly more compact wire format.
We’ve added an OEM facing feature which allows OEM complication providers to add extras to ComplicationData for use by OEM watch faces.
API Changes
UserStyleSettingandUserStyleOptionclasses now have builders which is the recommended way to construct them. Iacd03- Support for passing extras in
ComplicationData. This is intended for use by OEMs where they control both the complication provider and the receiving watch face. Setting an extra requires the privilegedcom.google.android.wearable.permission.COMPLICATION_EXTRASpermission. I4e3b2 - Watch faces commonly allow the user to select colors using a
ListUserStyle, with an icon for eachListOption. SinceUserStyleschemas are sent over bluetooth, it is important to keep the size of the schema down which can be a problem if many dozens of color options are given due to all those icons. To help with this we've addedColorUserStyleSettingwhere the option contains a list of colors instead of an icon, which is much more compact. Ib542e ColorUserStyleSettingandColorOptionrequire API 34 for use. I8771d
Bug Fixes
- This library now uses JSpecify nullness annotations, which are type-use. Kotlin developers should use the following compiler argument to enforce correct usage:
-Xjspecify-annotations=strict(this is the default starting with version 2.1.0 of the Kotlin compiler). Ifd363 b/326456246
New Features
- Introduce a new experimental API for Url prerendering to allow developers to speculative prerender candidate urls resulting in faster navigations. I0cfe7
- Introducing a set of new APIs to delete browsing data stored by
WebView. The new APIs inWebStorageCompatshould be preferred over the existing APIs inandroid.webkit.WebStorage, as they will guarantee deletion of all local storage, including the network cache and cookies, as well as any installed service workers. If new storage APIs are introduced in the future, then these new methods will be updated to include them in the storage deleted. Iad54f b/382273208 - Add
setPartitionedCookiesEnabledAPI. This will allow developers to enable and disable partitioned cookies inWebView. Ic506a b/364904765
API Changes
New Features
- Add API to allow customizing
ActivityEmbeddingAnimations. - Expand
WindowMetricsCalculatortest APIs to allow faking the window metrics.
API Changes
- Hide a few constructors I87b8d
- Allow apps to customize
ActivityEmbeddinganimations If31a8 - Adds support for
watchosDeviceArm64KMP target and target kotlin 1.9 Icf15d b/364652024 - Expose
WindowMetricsCalculatorAPIs. I1cebf
Bug Fixes
- This library now uses JSpecify nullness annotations, which are type-use. Kotlin developers should use the following compiler argument to enforce correct usage:
-Xjspecify-annotations=strict(this is the default starting with version 2.1.0 of the Kotlin compiler). Ie69ac b/326456246