Bug Fixes
- Fixed Firebase Test Lab (FTL) being unable to pull Baseline Profile or Macrobenchmark result files from the Baseline Profile Gradle Plugin. I2f678 b/285187547
To use FTL apply the plugin to the baseline profile module in the plugin block, with:
plugins {
...
id("com.google.firebase.testlab")
}
and then configure firebase test lab with:
firebaseTestLab {
// Credentials for FTL service
serviceAccountCredentials.set(file("credentials.json"))
// Creates one or more managed devices to run the tests on.
managedDevices {
"ftlDeviceShiba34" {
device = "shiba"
apiLevel = 34
}
}
// Ensures the baseline profile is pulled from the device.
// Note that this will be automated as well later with aosp/3272935.
testOptions {
results {
directoriesToPull.addAll("/storage/emulated/0/Android/media/${android.namespace}")
}
}
}
Also the created FTL device needs to be added to the baseline profile extension:
baselineProfile {
managedDevices += "ftlDeviceShiba34"
useConnectedDevices = false
}
API Changes
- Moved Gradle tasks
lockClocksandunlockClocksto be on benchmark projects, instead of available at the top level. This change was necessary as there is unfortunately no way to register these as top level actions without breaking project isolation. I02b8f b/363325823
Bug Fixes
BaselineProfileRulenow collects profiles for multi-process apps by signaling each running process at the end of the block to dump profiles. If a profile based compilation never successfully finds a process to broadcast to, the compilation will fail, as it's unexpected to have profile data within. Additionally, added an instrumentation argument to control dump wait duration:androidx.benchmark.saveProfileWaitMillisI0f519 b/366231469- From Benchmark
1.3.2: Fixed Firebase Test Lab (FTL) being unable to pull Baseline Profile or Macrobenchmark result files from the Baseline Profile Gradle Plugin. I2f678 b/285187547
To use FTL apply the plugin to the baseline profile module in the plugin block, with:
plugins {
...
id("com.google.firebase.testlab")
}
and then configure firebase test lab with:
firebaseTestLab {
// Credentials for FTL service
serviceAccountCredentials.set(file("credentials.json"))
// Creates one or more managed devices to run the tests on.
managedDevices {
"ftlDeviceShiba34" {
device = "shiba"
apiLevel = 34
}
}
// Ensures the baseline profile is pulled from the device.
// Note that this will be automated as well later with aosp/3272935.
testOptions {
results {
directoriesToPull.addAll("/storage/emulated/0/Android/media/${android.namespace}")
}
}
}
Also the created FTL device needs to be added to the baseline profile extension:
baselineProfile {
managedDevices += "ftlDeviceShiba34"
useConnectedDevices = false
}
Bug Fixes
- Added flash/torch/3A functionalities for image captures with
CameraEffect. The image captures withCameraEffectshould now have the same pre-capture and post-capture processings (e.g. flash trigger, 3A convergence etc. when applicable) as image capture without anyCameraEffect. I5ff30 - Optimized the pinch-to-zoom smoothness in
PreviewViewI04ffc - Decouple Ultra HDR from 10-bit output capability, as Ultra HDR support no longer requires devices to have 10-bit output capability. I96ff2 I0c3b3
New Features
- New APIs for querying camera features supported by the device. For example, checking if HDR and 60FPS can be enabled at the same time. It includes 2 artifacts: camera-feature-combination-query and camera-feature-combination-query-play-services. This is a compatible version of camera2's
CameraManager#getCameraDeviceSetup#isSessionConfigurationSupportedAPI with additional data provided by Google Play Service.
Bug Fixes
- Fixed
Preview/VideoCapturetarget frame rate issue on LEGACY level devices. The target frame rate set via thesetTargetFrameRateorCamera2InteropAPI was always overwritten to the value provided by theAeFpsRangeLegacyQuirk. With this fix, CameraX library will respect the value set via thesetTargetFrameRateorCamera2InteropAPI. Ie2d32 - Added flash/torch/3A functionalities for image captures with
CameraEffect. The image captures withCameraEffectshould now have the same pre-capture and post-capture processings (e.g. flash trigger, 3A convergence etc. when applicable) as image capture without anyCameraEffect. I5ff30 - Excluded problematic output sizes for
ImageAnalysison Samsung SM-A057G device. WhenImageAnalysisuses a resolution larger or equal to 1920x1440, it will cause black preview issue. AppliedExcludedSupportedSizesQuirkto the SM-A057G device to avoid the issue. I63dfe b/365877975 - Fixed
Preview/VideoCapturetarget frame rate issue when stream sharing mechanism is enabled internally to share a stream toPreviewandVideoCapture. I4fdac - Enabled the workaround to fix the incorrect JPEG image metadata issue on Samsung S10e and S10+ devices. With the fix, CameraX can successfully save the JPEG image, or correct Bitmap objects can be returned when calling the
ImageProxy.toBitmap()function on these devices if the incorrect JPEG image metadata issue happens. Iae493 b/356428987 - Disabled extensions for Samsung A52s' back camera whose id is 0, because native crashes might happen when capturing HDR images and configuring capture sessions might fail for the BOKEH or FACE_RETOUCH modes. I03ec9 b/364152642
- Fixed the
VideoRecordEvent.Finalize.ERROR_INSUFFICIENT_STORAGEevent is not triggered when recording a video and there is insufficient storage space available. Ia5b4f b/356399842 - Fixed issue where second video recording attempt fails on Oppo A5 (CPH1931). I181d6
API Changes
- Kotlin version update to 1.9 I1a14c
Bug Fixes
- Fixed an issue in
AnimatedContentsize animation by always tracking and starting animation from the current size to ensure continuity.
Bug Fixes
- Fixed a memory leak with
BasicTextwhen minLines is set to a non-default value.
API Changes
- Kotlin version update to 1.9 I1a14c
- Introduced flag
DraggableAddDownEventFixEnabledI848d5 - Introduced a new Semantics Role called Carousel to emulate the list behavior in Pagers for a11y services. Id354b b/354109776 b/239672673
- Removed the implicit
graphicsLayermodifier fromBasicTextcomposable. Added experimentalComposeFoundationFlags.RemoveBasicTextGraphicsLayerEnabledflag to be able to revert to the old behavior. Ie478d - Added
Modifier.recalculateWindowInsets()to allow children in the hierarchy to useinsetsPaddingeven when parents aligned them withoutconsumeWindowInsets(). I7f9e4
Bug Fixes
- Implement gesture pick-up in
detectDragGestures, draggables and scrollables. Now if a child draggable gives up on a gesture, the parent has the opportunity to pick it up. This allows for a more continuous and integrated gesture handling. Ic88fe - Update fling cancellation behavior in scrollables. Now if a scrollable flings and hits the bounds it will correctly pass on the fling velocity to the next scrollable in the chain instead of continue to drive the fling. I9326a
Behavior Changes
- Library no longer adds a dependency to
material-icons-coreso if your project relied on that, you will have to explicitly add that dependency in yourbuild.gradle[.kts]files. I735ff b/349894318 NavigationBarItemandNavigationRailItem’s active label color change fromonSurfacetosecondaryin order to improve usability, color contrast and improve coherence within the system Ibc297, to revert to the previous behavior, copy the default colors and change theselectedTextColortoMaterialTheme.colorScheme.onSurface.- Material 3 components are now using the new
MotionSchemeto define their motion. Ie0f93 - Indeterminate circular Progress Indicator motion changes I3c07e
- Update
OutlinedIconButtonColorsandOutlinedIconToggleButtonColorsfor better color contrast. I2743d - Updated container and content color for
FilledIconToggleButtonColorsandFilledTonalIconToggleButtonColors. Ic5d0f - Updated
OutlinedButtonborder color fromoutlinetooutlineVariant. 057f00
API Changes
- Added an optional
reverseLayoutparameter to theTopAppBar'senterAlwaysScrollBehaviorfunction to better support content that was set with areverseLayout. I4e0e5 SegmentedButtonnow supportscontentPaddingargument. I5ad91 b/358414376PullToRefreshStatedoes no longer have default implementation forisAnimatingI6a593- Added new overloads of Material
TextFieldandOutlinedTextFieldthat useTextFieldState. Added decoration box APIs that are compatible withTextFieldDecorator. If13a1 - Added parameter to control text field's
labelPosition. UsingalwaysMinimizeallows the UI pattern of displaying a label and placeholder in a text field at the same time even when the field is unfocused. I1ef2c - Added Material
SecureTextFieldandOutlinedSecureTextFieldfor password entry fields. I7e22d - Added a scope to text field labels to query animation progress. If5ec8
- Adds support for
MotionEvent.CLASSIFICATION_DEEP_PRESSto tooltips. I62e6a TimePickerState’sisAfternoonis now an extension val instead of a var in the interface, renamed toisPmI89a97- Updating typography class to support emphasized type scales. Ifa13c
- Added
ModalWideNavigationRailAPI and renamedModalExpandedNavigationRailAPIs toDismissibleModalWideNavigationRail. Ic9118 - Updated
FloatingAppBarScrollBehaviorto auto-calculate thescreenOffsetand not require a@Composable. Idf349 - Updates to the
LoadingIndicatorAPI to fix the naming at its defaults object. Added aLoadingIndicatorElevationconstant at thePullToRefresh. I1d72b - Updates to the
LoadingIndicatorAPI to fix the naming at its defaults object. Added aLoadingIndicatorElevationconstant at thePullToRefresh. I1d72b - Added an
amplitudeand awaveSpeedparameters to the indeterminate variations of theLinearWavyProgressIndicatorand theCircularWavyProgressIndicator. I2a0c5 - Support changing an icon toggle button's shape based on its pressed or checked state. Ibc781
- Updating typography class to support emphasized type scales. Ifa13c
SplitButtonshape morphs based on default / pressed state. RemovedAnimatedTrailingButtonapi becauseTrailingButtonapi can offer the same customizations I95066- Add modifier to animate showing and hiding of FAB, e.g. when content scrolls. I8338d
- Adding connected button group shapes and spacing to
ButtonGroupDefaultsto be used in a sample. I68e30 - Split button add horizontal padding for trailing button and enable optical centering calculated from start and end corner differences I122e2
- Introducing a new Material
MotionSchemeto allow setting a scheme for the component's motion. The scheme is set through theMaterialTheme. Id50c2
Bug Fixes
- Apply the correct focus traversal index to
Scaffoldchild Composables. The order istopBar,bottomBar, fab, content, snackbar. I5936b - Fixed an issue at the
DatePickerandDateRangePickerwhere in certain locales and format-skeletons some of the date elements (e.g. month names) did not start with a capital letter. I1430f - Integrate FAB and FAB Menu component tokens (minor visual updates to paddings and text) Ib57f3
ModalBottomSheetis now first in semantic traversal order, followed by the scrim. I436f9 b/358594665- Fix bottom app bar not disappearing entirely when scrolling under the navigation pill in edge to edge mode I3ee21
New Features
- Added predictive back support to
NavigableListDetailPaneScaffoldandNavigableSupportingPaneScaffold. I4dc21 b/359616816
API Changes
- Added
ThreePaneScaffoldStatetoThreePaneScaffoldNavigator. Navigation methods have been madesuspendto support navigation with animation. AddedseekBackto support partial navigation states (e.g. predictive back). I5a651 b/359616816 - Added
MutableThreePaneScaffoldStateto control the transition between scaffold values. The existingThreePaneScaffoldStatehas been made read-only. Idb3c6 - Expose default pane motion implementations I95a7b
- Enable setting initial anchor of pane expansion state Ie41b3 b/362350560
Bug Fixes
- Enforce 48x48dp min touch target size of drag handle 7ce6635 b/366018217
- Restore anchored position after configuration changes 3c9fc6b b/362353672
Performance Improvements
- Lazily create child context for
rememberCoroutineScopef61464rememberCoroutineScopeis typically used to launch coroutines in response to events that happen post-composition. In some scenarios these events may never occur, leading to added costs of Job creation and cancellation without any benefit.- Make the scope returned by
rememberCoroutineScopecreate itscoroutineContextlazily when accessed, avoiding job creation and cancellation entirely if the scope is never used.
Bug Fixes
- Fixed issue where specifying a generic outline clip would lead to an empty clip boundary on certain Android versions.
- Fixed exception thrown when the IME is active on an external View and the Next action is used to enter focus on the
ComposeView. TheclearFocus()behavior aligns with View behavior on API < 28, whereclearFocus()can cause the default View to be focused. - Fixed an issue where an incorrect
placeOrderwas used for lookahead invalidation, therefore fixing an edge case where lookahead placement was skipped.
API Changes
- Kotlin version update to 1.9 I1a14c
- Introduced a new Semantics Role called Carousel to emulate the list behavior in Pagers for a11y services. Id354b b/354109776 b/239672673
- Rename
invisibleToUser()tohideFromAccessibility. Its function remains the same. See documentation for more details. Ib43a3
Bug Fixes
- Updating docs for
SensitiveContentmodifier Ib0442 - Fixed issue where certain generic outline clips would be ignored in combination with elevation shadows on some Android versions
- Fixed issue where empty clips would be applied when a generic outline clips was specified on certain Android versions.
- Fixed exception thrown when the IME is active on an external View and the Next action is used to enter focus on the
ComposeView. TheclearFocus()behavior aligns with View behavior on API < 28, whereclearFocus()can cause the default View to be focused. - Fixed an issue where placement happened on detached nodes in
LazyListby separating the management of subcomposition for different layout passes. - Fixed a problem where the Software Keyboard flickers when focus switches from a
TextFieldto anEditTextor any other View based editor. - Nested Scroll nodes will now dispatch
onPostFlingevents correctly after they get detached. - General performance improvements
Important changes since 1.2.0
Various important improvements in making the library more reliable and consistent, including but not limited to:
- Support
preferImmediatelyAvailableCredentialson all android versions. - Improved proguard rule to reduce the app size increase.
- Various minor bug fixes.
Bug Fixes
- Fixed an issue where quickly pressing the system back button or quickly doing gesture back will cause Fragments to crash when using Androidx Transitions. Ibc038 b/364804225
- Fixed an issue in fragments where interrupting a predictive back gesture would send the fragment manager into an undefined state and even up showing the wrong fragment. If82e2 b/338624457
- Fixed an
UninitializedPropertyAccessExceptioninAndroidFragmentwhen dynamically swapping out the Class yourAndroidFragmentinstance is using. I12dea
Bug Fixes
- Fixes in documentation
New Features
- A modular and configurable library to make it easy to create, render, and manipulate beautiful ink strokes authored in your application.
API Changes
New modules to help developers build rich inking experiences:
- Authoring: Use
InProgressStrokesViewfor high-performance, low latency rendering of strokes in real time as inputs are received. - Rendering: Use
CanvasStrokeRendererandViewStrokeRendererto draw the finished ink strokes as part of an app’s user interface. - Strokes: Core data types used for inking features.
- Brush: Configurable specification of how strokes will look and act in response to user input.
- Geometry: Geometric operations like intersection and coverage to power tools like selection and erasing.
Bug Fixes
- Prevent prediction from going beyond requested amount Ifbf49 b/369330439
- 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. If6b4c b/345472586
Kotlin Multiplatform
- The
lifecycle-viewmodel-savedstatemodule is now configured to be KMP compatible in preparation for APIs likeSavedStateHandlebeing made available in the common source set in a future release. I503ed I48764 b/334076622
New Features
- Navigation Type Safety now supports Serializable classes that include a
Double,Double?,DoubleArray,DoubleArray?,List<Double>, andList<Double>?without requiring any customNavType. I570eb Ibc4c0 I37461 I5bed4 b/359245753
Bug Fixes
- Improved the error message for when Navigation fails to map a route's argument to a
NavType, the new error message will contain the argument name, argument fully qualified name, and the route's fully qualified name. Id8416 b/346264232
New Features
- Add support for SDK-defined constants using
const valin annotated interfaces and annotated values.
API Changes
- Disallow objects in the apicompiler (these were previously silently ignored)
Bug Fixes
- Fix crash when there are source directories ending in .class
Bug Fixes
- Fixed support for multi-process Baseline Profile recording by signaling multiple processes sequentially. This fix requires both updating to
androidx.benchmark:benchmark-macro:1.4.0-alpha02in your macrobenchmark/baseline profile module andandroidx.profileinstaller:profileinstaller:1.4.1in the app. I0f519 b/366231469
Bug Fixes
- Fix an issue with the KMP implementation of
room-pagingthat would cause anError code: 8, message: attempt to write a readonly databasedue to starting a write transaction on a read connection. b/368380988
Kotlin Multiplatform
- The
SavedStatemodule is now KMP compatible. Supported platforms now include Android, iOS, Linux, Mac, and JVM desktop environments. I26305 b/334076622
New Features
- Introduce
SavedStateopaque type as an abstraction to provide a consistent way to save and restore application state in KMP. It includes aSavedStateReaderandSavedStateWriterfor modifying the state to be saved. On Android,SavedStateis a type alias forBundle, ensuring binary compatibility and facilitating the migration of existing APIs to a common source set. On other platforms,SavedStateis aMap<String, Any>instance. I18575 b/334076622
// Create a new SavedState object using the savedState DSL:
val savedState = savedState {
putInt("currentPage", 1)
putString("filter", "favorites")
}
// Read from a SavedState object
val currentPage = savedState.read { getInt("currentPage") }
// Edit an existing SavedState object
savedState.write {
remove("currentPage")
}
API Changes
SavedStateRegistryandSavedStateRegistryControllerare now KMP compatible. Id7bb8 b/334076622SavedState,SavedStateWriterandSavedStateReaderare now KMP compatible. I26305 b/334076622
API Changes
- We have added support for bi-directional swiping in
SwipeToReveal, for rare cases where the current screen does not support swipe to dismiss. . The default is still to swipe-to-reveal only on right-to-left swipes and it is strongly advised to respect the default behavior to avoid conflict with swipe to dismiss. Ifac04 - We have updated
LazyColumnStateto overridecanScrollForwardandcanScrollBackward- this now stops scrolling when the first or last item is exactly at the center of the screen. Ia77d7 - We have added new
HorizontalPagerandVerticalPagercomponents which address common issues, such as focus handling and interacting with system swipe to dismiss that could occur on Wear. I2902b - We have added support for
LazyColumnto expose the client'skeyandcontentTypethroughlayoutItems. I1bd9c
Bug Fixes
API Changes
- We have updated the API and appearance of
HorizontalPageIndicatorand addedVerticalPageIndicatorfor use withVerticalPagerIc9309 AlertDialognow supports the ability to omit the default bottom button from the button stack variation, for custom layouts in which EdgeButton is not required. I34fa9- We have added a
SwipeToRevealcomponent for Wear Material 3 Ic38b2 - We have added support for bi-directional swiping in
SwipeToReveal, for rare cases where the current screen does not support swipe to dismiss. The default is still to swipe-to-reveal only on right-to-left swipes and it is strongly advised to respect the default behavior to avoid conflict with swipe to dismiss. Ifac04 - We have renamed
EdgeButton'sbuttonHeightparameter topreferredHeight. I4fab3 - The Kotlin version has been updated to 1.9 I1a14c
- We have renamed
OpenOnPhoneDialogDefaults.IcontoOpenOnPhoneDialogDefaults.OpenOnPhoneIconto avoid clashing withIconI0f391 - We have added support for
ScrollIndicatorinLazyColumn. Ia546a - We have updated default values for
TextToggleButtonandIconToggleButton. I7aaa9 - We have simplified the
PickerandPickerGroupAPI. Id0653 - We have added
CardDefaults.ShapeandCardDefaults.Height, which (being tokens) were otherwise private to developers using the library. I1594a b/347649765 - We have renamed the progress parameter for the binary segmented circular progress indicator to
segmentValue. Ib72d9 - We have updated the colors and layout for Slider. Ic3eec
Bug Fixes
Bug Fixes
- Resolve the issue that prevented the 1.12.0 APIs from being available in the release.
API Changes
- Added a method to compute the
WindowSizeClassfromWindowMetrics. 874dba - Change the
WindowSizeClassmethods tocontainsWidthDp,containsHeightDp, andcontainsWindowSizeDpfor clarity. fa760d - Convert
WindowAreaControllerto abstract base class. I90893
Bug Fixes
- Add support for relative bounds when creating a test
FoldingFeature. 2e6b3e - General bug fixes when selecting a
WindowSizeClass.