New Features
BaselineProfileRulenow introduces acollectWithResults(...)API which includes a list of paths to the computed profiles. I056f8- Added
androidx.benchmark.measureRepeatedOnMainThread.throwOnDeadlineinstrumentation argument, which can be set to false to disable the throw on deadline behavior ofmeasureRepeatedOnMainThreadfor local testing. Not otherwise recommended, as this increases the likelihood of ANRs during tests. Idbeec b/353226476
API Changes
- Added
@JvmOverloadstoMicrobenchmarkConfigconstructor. I13fd3 - Refactored
BenchmarkRuleto be built on top of coroutines, and support betteryield()behavior. This refactor removed several experimentalBenchmarkStateAPIs, but will be followed by replacements as needed. Additionally, addedrunWithMeasurementDisabledto clarify behavior (all measurement is paused). In the future,runWithTimingDisabledwill be deprecated. I19837 b/389149423 b/311242861 - Move
PerfettoTraceProcessortoTraceProcessorin a newandroidx.benchmark:benchmark-traceprocessorartifact, and make most of its API non-experimental. Any customTraceMetricor anything reading from traces will need to update to the newTraceProcessorimport. The newTraceProcessorAPI works exactly like the old one, but is a standalone interface library (somewhat analogous to theandroidx.sqlitelayer from Room) with an Android-specific implementation built into macrobenchmark. The new artifact can be used on JVM as well, but currently you'll need to start your own copy of theTraceProcessorbinary and offer a port to connect to it on. I3a767 I62563 b/381134564
Bug Fixes
- Throw a clearer error message when
MacrobenchmarkScope.startActivityAndWaitfails to launch the target process (potentially due to a crash in the target process), instead of the more ambiguous 'Unable to confirm activity launch completion' message I3539b - Fixed several syntax errors in Kotlin samples, and syntax highlighting in several Java / build.gradle samples. Ib3808
- Clarified
ArtMetricandCaptureInfoparameter docs. I96e60
API Changes
- Added browser connection/session support to Auth Tab. I6e47b
- Added a new API
CustomTabsSession#isEphemeralBrowsingSupportedthat determines whether or not the ephemeral browsing is supported Ie4dea b/384548523 - Added color scheme params support to Auth Tab APIs. I630e1
- Added experimental ephemeral browsing option to Custom Tabs I9549d
- Updated experimental Auth Tab APIs I8b674
- Add new API to check if the Custom Tabs provider supports multi-network. I4307a
- Add new service intent filter category to support multi-network. I4354a
- Add new API to set/get the bound network when launching a URL over a custom tab. I493e1
- Added experimental Auth Tab APIs I9b4d4
- New experimental APIs for
PendingSessionIb40e5
Bug Fixes
- Updated AuthTabIntent Javadocs I2490c
- Fixed session support in Auth Tab I4e280
- 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). Ic7bf5 b/326456246 - Removed manual outlining of access to new platform APIs since this happens automatically via API modeling when using R8 with AGP 7.3 or later (e.g. R8 version 3.3) and for all builds when using AGP 8.1 or later (e.g. D8 version 8.1). Clients who are not using AGP are advised to update to D8 version 8.1 or later. See this article for more details. I9496c b/345472586
External Contribution
- Introduce a new IPC call
ICustomTabsService#prefetchWithMultipleUrlsto avoid multiple IPC calls for single URLs. Ie5025 - Make
CustomTabsSession#prefetchpropagateCustomTabsSession’s sessionid(mID)toCustomTabsService. I4ec7b - Add a new experimental API
CustomTabsSession#prefetch(List<Uri>, PrefetchOptions), which overloads the existing API to accept multiple URLs. I54f35 - Add a new experimental API
CustomTabsSession#prefetch(Uri, PrefetchOptions), which tries to prefetch the main page (without subresources) for future navigations. I340cf
Bug Fixes
- Fixed
IndexOutOfBoundcrash with link annotation. Ic96d2 - Fixed infinite recomposition in some edge cases with links. I04a03
Known Bugs
- A bug was identified that can cause text to wrap unexpectedly in rare scenarios on Android API level 35. It cannot be fixed in 1.7, so it will be fixed in 1.8. b/391378120
API Changes
SemanticsNodeInteraction.semanticsId()has been removed. UseSemanticsNodeInteraction.fetchSemanticsNode().idinstead. Ie397a- Rewrite
requestAutofillAPI to exist outside of autofill manager. Id1929 ContextualFlowRowandContextualFlowColumnhave been marked as deprecated. This experimental component was introduced in 1.7 and had not yet been stabilized, and the implementation has been deemed undesirable. In the future, a component solving the use cases this component was meant to solve may be provided.FlowRowandFlowColumnhave experimental overloads that were introduced in 1.7 that include anoverflowparameter. The use of this parameter has been deprecated, and the overloads without this parameter can be used instead. The default "overflow" behavior for these overloads will be "Clip", as it was since its introduction.- Many use cases for
ContextualFlowRowcan be accomplished usingFlowRow, but we acknowledge that is not true in full generality.ContextualFlowRowis completely implementable in user-space, and one can attempt to copy its implementation and adapt if desired. In the future, we hope to solve these use cases in a different way. Ibafec
Bug Fixes
- Fix text layout with ellipsis sometimes translating incorrectly during animations, see b/389707025 for more info Ie55b1 b/389707025
- Fixed a bug in
BasicTextwithTextAutoSizeandmaxLinesset to 1. Ic0450 b/376834366 - Text's minimum intrinsics height now takes
minLinesparameter into account. It means that minimum intrinsics height reported won't be smaller than the height required to satisfy theminLinesparameter I225f9 b/388299762
New Features
- Added more flexibility in customizing the appearance of Checkboxes with a new API. This API provides Stroke parameters that allow for greater control over how the checkmark and the checkbox-outline are rendered. I65a88
- Added
TwoRowsTopAppBarAPI, a more customizable alternative to Medium and Large app bars for creating two-row top app bars. Developers now have control over the content of titles and subtitles in both collapsed and expanded states, with customizable heights for each state. I0be3c b/306697446 b/229134133 b/268068946
API Changes
- Renamed an experimental
BottomAppBarvariation toFlexibleBottomAppBar, providing more control over content arrangement and height. Iaa448 - Update naming for properties in Button Group default object to be
CapitalCase. Update the name ofanimateFractionto be more precise to the behavior that it's representing. I545cd - Adding overloads for common buttons that allow for animated shapes on press interaction. Added cached button shapes. I5ec20
- You can now control how a
FloatingToolbarwith FAB reacts to scrolling by providing aFloatingToolbarScrollBehavior. For toolbars positioned along a center edge (like top or bottom center), we recommend using a scroll behavior to hide the entire component on scroll for a cleaner look. This also prevents the FAB from becoming off-center, which could happen when using theexpandedflag for collapsing. I33f67 - Updates the experimental
TopAppBarAPIs to useAlignment.Horizontalinstead of a customTopAppBarTitleAlignmentwhen setting the alignment of the title and subtitle. I70ca2 SliderState#onValueChangeis now public to give more control to the user I104eb- Introduce
NavigationSuiteScaffoldStateto allow for animation of the navigation component. Also introduce overloads ofNavigationSuiteScaffoldandNavigationSuiteScaffoldLayoutthat have a state param. I6a8c9 b/328674235
Bug Fixes
- Move
IconButtonColorsandIconToggleButtonColorsclasses fromIconButtonDefaults.ktback toIconButton.kt. I3c233
External Contribution
SliderState#isDraggingis now public. I8458a
API Changes
- Introduce factory functions to create pane expansion anchors of the offset type from the start and the end, respectively. I2eb21
- Seal
PaneMotioninterface and remove its default transition methods. Ifc4c7 - Introduce APIs to get the current anchor and animate to an anchor. Icf95d
- Introduce accessibility APIs for pane expansion Icc669
- Change
PaneScaffoldParentData.preferredWidth's type to DP. Id98ee
API Changes
- Fixes an issue where raising a throwable during composition that does not extend from Exception may lead to a 'Pending composition has not been applied' error. I356be b/382094412
API Changes
ContextualFlowRowandContextualFlowColumnhave been marked as deprecated. This experimental component was introduced in 1.7 and had not yet been stabilized, and the implementation has been deemed undesirable. In the future, a component solving the use cases this component was meant to solve may be provided.FlowRowandFlowColumnhave experimental overloads that were introduced in 1.7 that include anoverflowparameter. The use of this parameter has been deprecated, and the overloads without this parameter can be used instead. The default "overflow" behavior for these overloads will be "Clip", as it was since its introduction.- Many use cases for
ContextualFlowRowcan be accomplished using FlowRow, but we acknowledge that is not true in full generality.ContextualFlowRowis completely implementable in user-space, and one can attempt to copy its implementation and adapt if desired. In the future, we hope to solve these use cases in a different way. Ibafec
SemanticsNodeInteraction.semanticsId()has been removed. UseSemanticsNodeInteraction.fetchSemanticsNode().idinstead. Ie397a- The old autofill APIs are deprecated. Use the new semantics based API instead. I943ff
- Rewrite
requestAutofillAPI to exist outside of autofill manager. Id1929
Bug Fixes
- Fixed focus issue where
requestFocus()with a nonsensicalpreviouslyFocusedRectparameter (related to the focus direction) would skip past aComposeView. Ifdc2f b/388590015 - Fixed an occasional NPE when using
GraphicsLayer.record { this@ContentDrawScope.drawContent() }. If you are recordingdrawContent()in this way, make sure to use theGraphicsLayer#recordextension function insideDrawScope, and not the member function onGraphicsLayer. I75fc0 b/389046242 - Fix text layout with ellipsis sometimes translating incorrectly during animations, see b/389707025 for more info Ie55b1 b/389707025
API Changes
- Add
BuildCompat.isAtLeastBfor checking if an API added in Baklava is available I0f89c - Add an experimental API to get a list of built-in displays. Idda4d
- Add a set of APIs related to ensuring system bar contrast I9849c
Bug Fixes
- Fix issue where
getLaunchDisplayId()returned an incorrect default value of 0 on SDK < 26. Icd679 - 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). Iaf3e1 b/326456246
New Features
- Add
MutableStateSerializerfor serializingandroidx.compose.runtime.MutableState. Idfc48 b/378895074
API Changes
- Replace overloaded
SavedStateHandle.saved()delegate functions with default parameters Icd1c1 AbstractSavedStateViewModelFactoryis deprecated as it creates aSavedStateHandlefor everyViewModel, causing unnecessary overhead. UseViewModelProvider.FactorywithCreationExtras.createSavedStateHandleinstead for more efficientViewModelcreation. Ia920b b/388590327
New Features
- Enable customization of
Orbiterproperties on XRNavigationBarandNavigationRail. Ic300f
API Changes
- Create ability to override
ThreePaneScaffoldon XR Ib66f1 - Implement non-animated Pane override for XR I7f620
- Add and use new experimental annotation
ExperimentalMaterial3ComponentOverrideApiIa1eaf
Bug Fixes
- Pin Material3 XR's dependency on XR Compose. Ia02cc
Bug Fixes
NavDestinationlabels provided through XML will be parsed viaNavType.getto ensure customNavTypelogic is respected. Id366d b/388100796- When navigating to activity with
dataPattern,ActivityNavigatorwill now try to encode the arg value with the argument'sNavType. I1a71d b/383616432
Bug Fixes
- Fix an issue that caused an unexpected scale animation when using Navigation Compose. I480f4 b/353294030
- From Navigation
2.8.6:NavDestinationlabels provided through XML will be parsed viaNavType.getto ensure customNavTypelogic is respected. I7ec2f b/388100796 - From Navigation
2.8.6: When navigating to activity withdataPattern,ActivityNavigatorwill now try to encode the arg value with the argument'sNavType. I16376 b/383616432 - From Navigation
2.8.5: Fixed an issue that caused an unexpected scale animation when using Navigation Compose and calling navigate in the same frame that the current animation is ending. I26cb1 b/353294030
New Features
- Added a Composable object called
SandboxedSdkUiwhich can be used to display remote content within a Compose UI. This object utilizes existingSandboxedSdkViewconcepts for session management and event listeners. I009cf - Changed the
SandboxedUiAdapter.openSessionsignature to include a newSessionConstantsparameter which replaces the previouswindowInputToken. This parameter is to be used to pass values which will be constant for the lifetime of theSandboxedUiAdapter.Session. Ibc0df I28435
Known Issues
SessionObserverevents are not sent forSandboxedSdkUiwhen it is scrolled.SandboxedSdkUiis not clipped by parent views when it is in Z-above mode.
API Changes
New Features
- Added support for the updated
SessionConstantsparameter inSandboxedUiAdapter.openSession. I65886
API Changes
- Room now targets Kotlin language 2.0 and will require projects to also compile with Kotlin 2.0 and equivalent or high language version. I8efb0 b/315461431 b/384600605
Bug Fixes
- Fix an issue in Room KMP database builder when a simple name instead of a path was used in Android and the database file resolved path would not be located in the app’s data directory. I83315 b/377830104
- Fix an issue with the Room Gradle Plugin where configuring the schema inputs and output was causing an issue on Android projects:
property 'inputDirectory' is final and cannot be changed any further.1dbb4c b/376071291 - Add support for KSP2 in Room Gradle Plugin fixing an issue where the schema directory was not being properly set up by the plugin. Iec3c4 b/379159770
External Contribution
- Fix an issue with
Roompaging integration causing UI jumps when the initial key to refresh is too close to the end of the list. Thanks to Eva! I2abbe b/389729367
New Features
- Add
MutableStateFlowSerializerfor serializingkotlinx.coroutines.flow.MutableStateFlow. I6a892 b/378895070
API Changes
New Features
- The package names of the default system modules were added to the library's manifest to allow client apps to get the Device SPL for System Modules. Ic259c
API Changes
- Renamed
SecurityStateManagertoSecurityStateManagerCompat, added additional documentation for public properties and functions, and madegetComponentSecurityPatchLevelandgetVulnerabilityReportUrlstatic methods. I44a0c - The Update Availability functionality (
listAvailableUpdates()andgetAvailableSecurityPatchLevel()methods) has been removed from the API surface for now and is planned to return in a future update to the library. Idbc5e - Accessing Vendor SPL is now guarded by a compile-time flag that is disabled by default until a future update to the library. I45b58
getGlobalSecurityState()now returns the global security state from the system service for SDK 35+. I7b9da
Bug Fixes
- Fixed a crash that occurred when trying to get the Published SPL for Kernel on older versions of Android where published Kernel LTS versions aren't available. I93dff
API Changes
- Remove
androidx.sqlite.usewhich is now replaced by Kotlin'sAutoCloseable.usein the stdlib. I470f0 b/315461431 - The library is now compiled with Kotlin 2.0 and will require at least 2.0 in projects to be used. I8efb0 b/315461431 b/384600605
Bug Fixes
- Move the native library loading of
BundledSQLiteDriverto be lazy and when the first connection is opened to avoid the possibility of performing IO in the main thread. I78e92 b/363985585
Bug Fixes
- Updated
VersionedParcelableto avoid class init during the initial stages of unparceling, which prevents externally-controlled inputs from executing unexpected code in static initialization blocks for non-VersionedParcelableclasses already present in the application classpath. Icceed - 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). Ibc328 b/326456246 - Removed manual outlining of access to new platform APIs since this happens automatically via API modeling when using R8 with AGP 7.3 or later (e.g. R8 version 3.3) and for all builds when using AGP 8.1 or later (e.g. D8 version 8.1). Clients who are not using AGP are advised to update to D8 version 8.1 or later. See this article for more details. Ia60e0 b/345472586
API Changes
- On
CurvedTextStyle, we have split letter spacing into clockwise letter spacing and counter clockwise letter spacing. This is required because clockwise letters fan out from the baseline whereas counter-clockwise letters fan in (so larger letter spacing is needed) I4b848 - The
CompositionLocalLocalReduceMotionhas been simplified to return a Boolean instead of aReduceMotionobject. TheReduceMotioninterface has now been deprecated. Previous invocations such asLocalReduceMotion.current.enabled()can be replaced withLocalReduceMotion.currentI4937f - In
PagerDefaults,snapAnimationSpechas been renamed toSnapAnimationSpec. I20c9a
API Changes
- On
CurvedTextStyle, we have split letter spacing into clockwise letter spacing and counter clockwise letter spacing. This is required because clockwise letters fan out from the baseline whereas counter-clockwise letters fan in (so larger letter spacing is needed) I4b848 - We have updated
IconButtonShapes,IconToggleButtonShapes,TextButtonShapesandTextToggleButtonShapesto improve consistency across Material3 libraries. This change also introduces shape caching to reduce the number of allocations. I049fc - We have removed the
pressedShapeCornerSizeFractionparameter from thevariantAnimatedShapemethod inIconToggleButtonandTextToggleButtonI58a65 - We are introducing improvements to curved text rendering (including
TimeText) that are incompatible with non-round screens. Non-round screen support is also no longer part of the Wear OS requirements, see the Getting Started guide for more information. I1cc1c - We have updated
ButtonGroup’sButtonGroupScope, replacing the DSL-basedButtonGroupItemwithModifier.weight,Modifier.minWidthandModifier.enlargeOnPress. I16c3c - In the
ButtonGroupAPI, we have updated the new modifier-basedButtonGroupScope:enlargeOnPressis now calledanimateWidth, and it takes anInteractionSource, rather thanMutableInteractionSourcebecause it is not necessary to mutate it. We have also added public constantButtonGroupDefaults.DefaultMinWidth, the default minimum width of buttons in aButtonGroup. Ie27ec - We have updated
ListHeaderDefaults.contentColorto start with a lowercase letter as it is a composable property I125a5 - We have added a content description parameter to
SliderDefaults.DecreaseIconandSliderDefaults.IncreaseIcon, with suitable default values I2e1a7 - We have renamed the
spacingparameter inPickerandPickerGrouptoverticalSpacingIb75cc - We have removed
ConfirmationDialogDefaults.successTextandfailureTextbecause it is expected that callers ofConfirmationDialogwill provide strings with more context. Also renamedconfirmationCurvedTexttoconfirmationDialogCurvedText. Finally, renamed the Dialogshowparameter to visible for consistency with other recent updates to dialogs. I10074 IconButtonrenameddisabledImageOpacitytoDisabledImageOpacity. I5f94a
Bug Fixes
- We have fixed a bug in
EdgeButtonanimation so that the correct size is used in each frame Id3b58 - Fixed an issue with
animateContentSizenot working withButton. Ib18a0 - We have changed the Title Large type scale to have font size
18dpIc9d52 - We have updated
AlertDialogspacing and icon size Iac28c - We have fixed inconsistencies in large screen breakpoints (screens at and above 225dp are large screen) I36474
- Fixed a minor bug in button positioning I952c2
New Features
- Added API option to set different triggers for Lottie animations. Additionally, added API for triggers fired when layout is visible I8272d
- Added
border,visibilityandopacitymodifiers. I6d3dd - Added avatar button to ProtoLayout Material3 component. Idb5ae
- We are now allowing margins (side and in some cases bottom) to be customized in Material3
primaryLayout. Ib22f6 - Add the segmented variant of the circular progress indicator. I6a648
- Added compact button component to ProtoLayout Material3. Ia3c5c
- Added pill shape button and image button components to ProtoLayout Material3. Ifb88a
API Changes
LayoutModfier.foldInis now calledfoldRightto better reflect its expected behaviour Idf242VisibleOncetrigger is now experimental. Ib2d26- Remove
withOpacityfrom the public API as there is a graphics library alternative. I030c2 - Renamed top level methods in
LayoutString.ktandLayoutColor.ktto have Java friendly names. I7aff0 - Removed non-ProtoLayout typographies in Material3. Idd9ae
- Add suffix Color to fields in
*Colorsclasses in Material3. I2d114
Bug Fixes
New Features
The 1.1.0-beta01 release of Wear Phone Interactions indicates that this release of the library is feature complete and the API is locked (except where marked as experimental). Wear Phone Interactions 1.1 includes the following new functionalities and APIs:
- Added property
redirectUrltoOAuthRequest. - Documentation fixes
- Additional type in
PhoneTypeHelperto specify when device is not paired with phone, instead of using existing unknown type.
API Changes
- Added new definition for paired device type - none, when device is not paired with the phone. I06cb8