API Changes
- Introduce the experimental
ActivityFlagsAPI for managing runtime behavior changes and migrations. The first flag enables stable ordering forOnBackPressedCallback, making back navigation more predictable across lifecycle changes. Developers can opt out by settingActivityFlags.isOnBackPressedLifecycleOrderMaintained = false. I06bdf Id08bb I439aa b/422730945 b/450533622
Dependency Update
- Update lifecycle dependencies to 2.9.4 Ic9fb2
API Changes
- The
OptInannotation now supports theElementType.PARAMETERtarget.
Bug Fixes
:xr:arcore:arcore-openxradded as an implementation dependency to:xr:arcore:arcoreI47315 b/446999229
New Features
- CameraX has migrated to a unified, high-performance camera stack, which is also used by the Pixel camera app. Known as
CameraPipe, this new stack is a collaboration between the CameraX and Pixel Camera teams. It ensures that all improvements are shared, benefiting both CameraX users and the Pixel camera app.
API Changes
- Added new APIs for dynamic camera add/removal detection. See the
CameraPresenceListenerAPI for more details. I41ead b/427182232 b/419441394
Bug Fixes
- The feature group API now provides consistent results when
PREVIEW_STABILIZATIONis used withVideoCapture. This corrects a bug that caused inconsistent results when aPreviewuse case was not also active. Ifed82 b/449913903 - Fixed an issue where unsupported preferred features were incorrectly made available. Features are now correctly filtered when their required use cases are not met. I38db8 b/449532342
- Fixed glitchy video result on Samsung Galaxy S6. I612d9 b/235127608
- Fixed an issue where
CameraInfo#isFeatureGroupSupportedcould incorrectly return true forPREVIEW_STABILIZATIONif theSessionConfigin the query was already configured with other features. I2c355c b/437816469
API Changes
- Exposed the default viewfinder
ImplementationModevia the newViewfinderDefaults.implementationModepublic API. This is now used as the default for bothViewfinderViewand theViewfindercomposable. Ic3f52
API Changes
- The
SharedContentConfigfactory method that takes a lambda indicating whether the shared element should be enabled has been removed.lookheadScopeCoordinatesAPI has been updated with aLookaheadScopebeing the receiver scope, with source coordinates being the parameter. Id1fc2 b/452416806 BoundsTransforminterface has been updated to be consistent withSizeTransform. Ia46f2 b/343696350- Deprecated
ScaleToBoundsAPI has been removed. Please usescaleToBoundsinstead. I17296
API Changes
- Updates all indirect touch APIs to use the name indirect pointer APIs to match pointer input APIs. I238ce b/451607214
- Annotated
PagerState.currentPageOffsetFractionwith@FrequentlyChangingValue. Idfaab
Bug Fixes
- Fixes marquee behavior for RTL layout directions. Ib8be3
API Changes
- Enhanced
SearchBar.InputFieldwith akeyboardOptionsparameter, allowing for optimized text input by specifying keyboard options andlineLimitsparameter allowing to specify text wrapping scrolling Id08a4 b/416991049
Bug Fixes
- Fixed a bug in Slider where press interactions were not emitted on touch down. This change ensures that a
PressInteraction.Pressis emitted immediately onawaitFirstDown, providing instant visual feedback. If9e25 b/308501482 - Fixed an issue with the
Tooltipcaret not changing directions when scrolling. TheTooltipBoxnow triggers a recomposition whenever the tooltip popup switches sides, ensuring the caret's direction is updated correctly. I5ad1e b/438875827
Important changes since 1.1.0:
- Introduce
PaneScaffoldScope.preferredHeightmodifier for devs to provide pane preferred heights that will be applied with new adapt strategies we are going to introduce. I957dd - Add saveable state holder to
PaneScaffoldScopeId9299 - Introduce reflow strategy for adaptation I75c6a
- Introduce levitate strategy for adaptation I1ba7c
- Make
currentWindowAdaptiveInfo()function support large and extra-large window width size classes I92e97 - Support custom dragging behavior with pane expansion state If5c61
API Changes
- Material adaptive scene strategies now allow passing custom pane adapt strategies Iae61d b/437981298
- Graduate pane scaffold horizontal order APIs to stable I23ab3
- Introduce
DragToResizeStateto Levitate strategy I717bd - Deprecate window size APIs I6749e b/424442112
API Changes
RetainedValuesStore.getExitedValueOrDefaultis renamed toRetainedValuesStore.getExitedValueOrElseIf9653 b/452340613isKeepingExitedValueshas been renamed toisRetainingExitedValuesI660bf b/437095756RetainScopehas been renamed toRetainedValuesStore.RetainScopeHolderhas been renamed toRetainedValuesStoreRegistry.RetainScopeHolder.RetainScopeProviderhas been renamed toRetainedValuesStoreRegistry.ProvideChildRetainedValuesStore. Idf23a b/437095756
Bug Fixes
- Delayed initialization of
SavedStateinSaveableStateRegistryuntil the first usage. Ic0a93
Bug Fixes
- Fixed an issue where inline text content was disappearing if it was on the last line of a multi-line ellipsized text even though the inline content wasn’t in the ellipsized region. I76aaf b/441829208
- Fixed an issue where
onLayoutRectChangedmodifier callbacks were not always being called whendebounceMillisis not zero. 72aba47 b/445324854
API Changes
- Adds an optimization for focus change dispatching. This can be disabled with
isOptimizedFocusEventDispatchEnabled = falseI919fb b/449228515 - Updates all indirect touch APIs to use the name indirect pointer APIs to match pointer input APIs. I238ce b/451607214
TextDirection,TextAlign,Hyphens,FontSynthesisvalueOffunctions now throwIllegalArgumentExceptionwhen they receive an unknown value. I07c67- Update
CompositionDataTree.makeTreeto pass default values instead of wrapper function. Id64a6 b/445229688 - The test rule APIs
createComposeRule,createAndroidComposeRuleandcreateEmptyComposeRulewhich accept theeffectContextparameter are stable and the parameter defaults toEmptyCoroutineContext. If400c b/450540702 UnplacedStateAwareModifierNodewas renamed toUnplacedAwareModifierNodeI6a551 b/449719932- Undo the Content Capture Optimization Ic000b b/442364065
- Added
ComposeUiFlags.isRectManagerOffsetUsageFromLayoutCoordinatesEnabledfeature flag. It enabled performance optimization where coordinates requests likeLayoutCoordinates.positionInRoot()are using the cached offsets we already have inRectManager, instead of traversing the whole tree on each call. Ieaadc
Bug Fixes
PlaceholderSpannow correctly uses non-linear font scaling for sizing Id2ead b/324462728- Use
ViewCompatto perform haptic feedback constants supported at the platform level, relying on its fallback support for newer constants. Ib5a00
New Features
- Minor internal data serialization changes
API Changes
- Make
CorruptionHandlerpublic. I9ac35 b/452406457 - Use
androidx.core.util.FunctioninGuavaDataStore. I71eae b/448563999 - Add an overload for
GuavaDataStore.fromthat takes in an Executor instead of aCoroutineContext. I989fa b/448563183
Bug Fixes
- Fix
java.lang.UnsatisfiedLinkErrorwhen usingDataStorein an app which is optimized with R8, but which is not usinggetDefaultProguardFile('android-proguard-optimize.txt'). I27d0d b/434696293 - Fix issue where
GuavaDataStoreoperations could incorrectly run on the calling thread (e.g., the main thread) instead of the specified IO dispatcher. Ic91ea b/441801112
Bug Fixes
- Improved ANR protection in
native_app_glue. - Migrated from deprecated
ALooper_pollAlltoALooper_pollOnce.
New Features
- A new
EncoderPreferenceclass has been implemented. This enhancement enablesHeifWriterto consider encoder preferences, such as hardware or software encoding and enforcement of Constant Quantization (CQ), during the encoder selection process. If a suitable encoder cannot be found based on the specified preferences, an exception will be raised.
API Changes
- Added
EncoderPreferenceclass. I81efd
Bug Fixes
- Bug fixes in preparation for beta01 release I9900e
- Reduce rendering artifacts in strokes due to too many modeled inputs too close to each other.
- Fix a rare crash in input modeling.
API Changes
- Renamed
ActivityPanelEntity.moveActivitytotransferActivityI273c5 b/430332856
Bug Fixes
:xr:scenecore:scenecore-spatial-renderingand:xr:scenecore:scenecore-spatial-coreadded as implementation dependency of:xr:scenecore:scenecoreI6ab65 b/447000520- Exception is thrown if
session.sceneis accessed after session destruction. I77e6f
API Changes
ViewModelStoreNavEntryDecoratorDefaulthas been renamed toViewModelStoreNavEntryDecoratorDefaults, with an 's'. I6d27b b/444447434
Bug Fixes
rememberLifecycleOwnerno longer crashes if the owner receives anLifecycle.Event.ON_DESTROYevent before moving toLifeycle.State.CREATED. I6f98e b/444594991
Use the 1.9.0 stable version.
API Changes
SceneStrategyScopenow only has a no argument public constructor, suitable for testing yourSceneStrategyand the returnedScenein isolation. For more complex use cases, please userememberSceneState(). I8440c b/451679047
Bug Fixes
- Fixed infinite loop when chaining
SceneStrategywiththen. Iba3f0 b/450323470 - Fixed screen flicker when swapping the
backStackpassed toNavDisplayand using animations. Ief7b5 b/450967248
New Features
- Enabling Smart Menu Items on pdf content selection.
- Enabling hyperlink selection and GoTo link selection in pdf.
- Exposing selection menu api
fromPdfViewandPdfViewerComposable, which allows developers to add selection menu items. - Adding page alignment api in PdfView and PdfViewer Composable which allows developers to choose the page alignment when the content height < viewport height.
API Changes
- Made
contentDescnullable and removed default value. I86f8c b/441973880 - Expose
PdfSelectionMenuKeysfor Link Selection Menu Items Ic9b05 b/447079082 - Add
PageAlignmentAPI toPdfViewandPdfViewerinto androidx-main - Change angle-related API to use degrees and include unit in names, be clear about units in Angle conversion utilities and support both degrees and radians, change
StockBrushesAPI to take stock brush version as a factory function parameter and expose self-overlap behavior control for highlighter brushes, renameMutableAffineTransform.populateFromTranslatetopopulateFromTranslation, removeInProgressStrokesView.setRenderFactory/getRenderFactory. Id9eab b/436656418 - Add
PageAlignmentAPI toPdfViewandPdfViewerI9c9a5 b/438065228 - Expose Selection Menu API from
PdfViewerComposable Id9b0f b/407663999 - Make
PdfViewaViewGroup. No support for arbitrary children. Ib51d8 b/410008792 - Expose
HyperLinkSelectionandGoToLinkSelectionfromPdfViewI378c4 b/441280002 - Refactor
PdfPageContentto support generic selections I28f16 b/437845185 - Expose Selection Menu API from
PdfViewIdd547 b/407663737 - Move selection-related classes to a dedicated package I953cb b/436157691
- Introduce experimental
onPdfViewCreatedfor PdfView access inPdfViewerFragment. I86715 b/422620454 - Adds
FileDescriptorAPI toPdfLoaderI60b8d
Bug Fixes
- Improve input modeling to make strokes more accurately reflect input I93097
External Contribution
- Expose
PdfSelectionMenuKeysfor Link Selection Menu Items - Expose Selection Menu API from
PdfViewerComposable - Expose Selection Menu API from
PdfView
Bug Fixes
- Fix a performance issue with the Room SQLite Wrapper that was causing excessive JNI calls and significant performance degradation when iterating over a Cursor.
Bug Fixes
- Improved performance of Picker by refactoring the use of
LaunchedEffect. I94519 b/418192973 - Fixed a bug in
SwipeDismissableNavHoston API36+, where pressing the back button during predictive back animation interrupted and restarted the animation. The implementation now usesSeakableTransitionState.animateToinstead of Animatable, which has a slight performance benefit. I2241f b/428156670 - Fixed a bug for accessibility announcement ordering in
AlertDialog, where the confirm button was announced as 'Button. Confirm' rather than the standard 'Confirm. Button'. Ic2381 b/429378202
API Changes
- Implement
reverseLayoutforTransformingLazyColumnI19f9e b/352513793 - Added
ConfirmationDialogDefaults.VariantFailureIconfor use inFailureConfirmationDialog. This new generic error icon may be preferred in some cases, compared toConfirmationDialogDefaults.FailureIconwhich shows a broken connection to the phone. Ifc851 b/443115305
Bug Fixes
- Improved performance of Picker by refactoring the use of
LaunchedEffect. I94519 b/418192973 - Fixed a bug in
SwipeDismissableNavHoston API36+, where pressing the back button during predictive back animation interrupted and restarted the animation. The implementation now usesSeakableTransitionState.animateToinstead of Animatable, which has a slight performance benefit. I2241f b/428156670 - Fixed a bug for accessibility announcement ordering in
AlertDialog, where the confirm button was announced as 'Button. Confirm' rather than the standard 'Confirm. Button'. Ic2381 b/429378202 - Improve
TimePickernumber visibility on small screens. I68386 b/447625365 - Removed Lazy Layout fork from Wear Compose Foundation - this means that
TransformingLazyColumnnow uses the Compose Foundation Lazy Layout implementation, including prefetching, and benefits from a performance improvement on frame timings in most cases. Idd743 b/445911630
New Features
- Added new Platform event source (
isInAmbientMode) describing whether the device is in ambient mode or not Ief832
API Changes
- The
PendingIntentclickablenow accepts a fallback action (LoadAction/LaunchAction) to be used whenPendingIntentis not supported by theProtoLayoutRenderer. Fallback action will automatically be picked up and placed in the layout when the version of the Renderer is lower than the one supportingPendingIntent. I6eee2 b/450259727 protoLayoutScopefield withinMaterialScopeis now madeNonNullfor easier usage whenMaterialScopeis created viamaterialScopeWithResources. In addition, there is ahasProtoLayoutScopefunction to check for the presence of it. I1858f b/450067019
New Features
- Tile Previews is now updated to support automatic resource handling via
ProtoLayoutScope. If using image resources directly in the layout viamaterialScopeWithScopeorProtoLayoutScopedirectly, there is no longer need to specifyonTileResourcesRequestand resources specifically in theTilePreviewData, they will be collected automatically. I58516
Bug Fixes
ProtoLayoutScopecreated internally by theTileServicenow includes the ProtoLayout Renderer’sVersionInfo. I6eee2 b/450259727
Important changes since 2.10.0:
- The
minSdkhas been updated from API 21 to API 23. - The API
setRemoteSessionTimeoutMillisinWorkManager’s Configuration builder has been added to enable configuring the amount of time aRemoteWorkManagersession is alive from its last usage.
New Features
- Adds Projected XR library Ieedea7
API Changes
- Remove
SessionConfigureConfigureNotSupportedand replace it withUnsupportedOperationException. I7680f