Bug Fixes
- Fixed an issue with
EdgeToEdgeon API 35 in which invisible views caused unexpected measurement insets. If49ff
Dependency Update
- Activity now depends on Navigation Event
1.0.0-alpha07.
API Changes
- Projects released with Kotlin 2.0 require KGP 2.0.0 or newer to be consumed Idb6b5
Bug Fixes
- Previously
SparseArrayCompatwas returningnullfor valueAt andkeyAtwhen passed an index that was within the allocated range, but outside the inserted range0..size -1. As documented, this behavior was never expected and outside the valid input range and this change fixes this behavior to instead throwIndexOutOfBoundswhen passed an invalid index. I68453
External Contribution
Thanks Jake Wharton for the following contributions:
- Align
joinToStringbehavior with platform collections by adding a separator before and the postfix after the truncation indicator when limiting included elements. I1b7e8 ScatterSet.hashCodeno longer defends against recursion (i.e., the set being added to itself). This brings its behavior in line withScatterMap,HashSet, and the primitive scatter-based sets (e.g.,LongSet). Note that theequalsmethod was already susceptible to recursion andtoStringdefends against it—both behaviors which align with the other collections. I9c84aScatterSet.retainAllfunction is now inline to avoid creating a lambda instance. Ifa4b7ScatterSet.hashCodeno longer uses its capacity in the hash calculation ensuring equal contents but different capacities still produce the same value. Ic863bIllegalStateExceptionis now thrown if you callremove()beforenext()on an iterator of thekeys,values, orentriescollections ofScatterMap.asMap()orScatterSet.asSet(). This brings its behavior into alignment with the regular map and set behavior. I71694
API Changes
- Removed flag
isFlingContinuationAtBoundsEnabled. I6b84f - Removed flag
isAdjustPointerInputChangeOffsetForVelocityTrackerEnabled. I62380 - Removed flag
isOnScrollChangedCallbackEnabled. I667dc - Removed flag
isAutomaticNestedPrefetchEnabled. I4f416 - Removed flag
DragGesturePickUpEnabled. Ib8500 - Introduce
ScrollIndicatorStateAPI for representing scrollbar state I5e229
Bug Fixes
- Fixed a bug where using
Modifier.anchoredDraggablewas not invokingconfirmValueChange. Iff7cc
Behavior Change
- The size of the checkbox and indicator colors has been adjusted to align with the specification. To minimize UI disruption, the flag
isCheckboxStylingFixEnabledhas been added to help migration. Please enable it manually in your apps. This flag will eventually be removed in a future version. I5bcd3 b/304300693
API Changes
- Added
contentPaddingparameter forTopAppBarIa5fea - Add component override for nav suite scaffold I85312
Bug Fixes
- The
containerColorparameter inTimePickerDialogis now correctly applied, allowing customization of the dialog's background color. I47f89 b/403183883 - Modal navigation rail no longer loses focus when collapsing, and now closes in response to the ESC key. 4255257
Snackbarnow has correct keyboard focus order for action and dismiss buttons, dismiss button also supports displaying a tooltip. 11fa13d
New Features
- Support alternative input methods for the drag-to-resize feature Id7796
API Changes
- Support custom dragging behavior with pane expansion state If5c61
- Adds an indicator in the pane scope interface to denote if a pane should be interactable or not. Also uses this indicator to disable accessibility access for underlying panes when a levitated pane is shown with a scrim. If36f3
- Replace Scrim definition with composable lambdas I7d811
- Mark window size and posture related APIs as experimental I4ee96
- Expose
PaneScaffoldHorizontalOrderas a sealed public API Ia4ebe
Bug Fixes
- Workaround the crash caused by unnecessary approaching measure I0a65a b/418932957
New Features
We are excited to announce the first alpha release of the adaptive-navigation3 library. This new library, part of the Material Adaptive and Navigation3 ecosystem, is designed to help you build adaptive Material UIs integrated with the Navigation3 library.
Use scene strategies to implement a canonical list-detail pane scaffold (ListDetailSceneStrategy, rememberListDetailSceneStrategy) or a supporting pane scaffold (SupportingPaneSceneStrategy, rememberSupportingPaneSceneStrategy). For more information about scenes, scene strategies, and other new concepts introduced in Navigation 3, refer to the Navigation3 guide.
API Changes
- Added
@DoNotRetain, which can be used to annotate types that should not be used with theretainAPI, possibly because they will leak resources. Ie5435 - Projects released with Kotlin 2.0 require KGP 2.0.0 or newer to be consumed. Idb6b5
Bug Fixes
- Fixed movable content to correctly compute the operations to the Applier when the content modifies the root node of a composition. When computing changes for movable content an
up()call could be left pending and undispatched to the applier causing the applier state to be incorrectly positioned for any subsequent use. I7c583, I47b70 - Marks
CheckResultas deprecated because it is not meant to be used. I32934
API Changes
- Update
FillableDatato support non-text components such as toggles and lists, including boolean and integer values insideFillableDataand factory constructors to create boolean and list instances ofFillableDatathat translate to the platform’sAutofillValue. The relevant semantic property and action also are added. Ia8105 Icc5cf - In non-touch mode, the view system assigns initial/default focus to one of the focusable items on the screen. This feature is added to Compose and can be enabled by enabling
ComposeUiFlags.isInitialFocusOnFocusableAvailable. Ib9178 - Removed flag
isPointerInteropFilterDispatchingFixEnabled. Iaa589 - Removed flag
isNestedScrollInteropPostFlingFixEnabled. I2a756 - Add in
isHiddenFromAccessibility()andisInHiddenAccessibilitySubtree()semantics matchers. I9f5a1 - Added
runCurrent()toMainTestClockto run all due tasks on the underlying scheduler. This is to support running tests on aStandardTestDispatcher, where tasks are added to the scheduler rather than executed immediately when they have a delay of 0ms. A test can be setup to use aStandardTestDispatcherby creating aComposeTestRuleand passing aStandardTestDispatcherto it. By default, tests are run on anUnconfinedTestDispatcher, in which caserunCurrent()will never have to be called. - Added support for running tests on a
StandardTestDispatcher. Historically, the test framework was (and still is) set up using anUnconfinedTestDispatcher, which differs from a production environment in subtle ways. You can now change this setup by creating your ownStandardTestDispatcherand adding it to theeffectContextwhen creating yourComposeTestRule(or when calling runComposeUiTest ). I334d0 b/254115946 - Update code for creating a tree of nodes from
SlotTree. I997d3
Bug Fixes
- Compose UI now installs lifecycle-aware
RetainScopeson Android. The default behavior will now persistretain-ed values across configuration changes. Id4a09 b/177562901
External Contribution
- Adds the ability for
VelocityTrackerto calculate the velocity of a pointer based on tracked pointer events using platform-specific behavior. I621e8
Bug Fixes
- Audio Routing and Endpoint Handling
- Resolved an issue where a user's selected pre-call audio endpoint (e.g., Earpiece) would be incorrectly switched to Speaker when a video call starts. The library now ensures the user's preferred audio route is maintained. 8fa4ba7 71d7be8
- Improved the audio switching logic to prevent calls from automatically switching from Bluetooth headset to Speaker, especially when the Bluetooth device takes a moment to connect. This check requires the BLUETOOTH_CONNECT permission to differentiate between device types.de83f3e
- Optimized the auto-speaker functionality for video calls for users without Bluetooth devices. The library now performs a less intrusive check for Bluetooth devices before requesting the BLUETOOTH_CONNECT permission, improving the experience for non-Bluetooth users. 721f4e2
- Stability and Crash Fixes
New Features
- Glance wear tiles is now deprecated and will be removed in an upcoming release. It will replaced by the new glance wear widgets library.
API Changes
- Deprecates glance-wear-tiles I82afd
- Removing obsolete
@RequiresApi(21)annotations Ic4792 - Removing obsolete
@RequiresApi(21)annotations I9103b - Removes an unused module. We are not moving forward with Templates. I3fc90 b/430070874
- Projects released with Kotlin 2.0 require KGP 2.0.0 or newer to be consumed Idb6b5
- Fixes api council feedback I284c8
- Adds a new api for tinting buttons. This should be experimental until 1.0 ships I92523
- Updated API files to annotate compatibility suppression I8e87a b/287516207
- protolayout types are now fully supported across all tile-renderer APIS. I428b0
- Merged public and experimental API files for d,e,f,g-paths I03646 b/278769092
- Added
*DefaultsAPI forButton,Checkbox,RadioButtonandSwitch. It brings glance closer in line with the patterns of Jetpack Compose. I94828 - New Glance templates module I94459
- We've added support for
androidx.wear.protolayouttypes toTileRendererI4ac7f - More return type nullability of deprecated-hidden functions Ibf7b0
- Adding
@JvmDefaultWithCompatibilityannotation I8f206 b/251463569 - Added support for using lambdas as callbacks Ia0bbd
Bug Fixes
- Update glance-appwidget libraries to
compileSdk35 I2e26b
Bug Fixes
- Moving the default
minSdkfrom API 21 to API 23 Ibdfca b/380448311 b/435705964 b/435705223
New Features
- Add new Kotlin Multiplatform (KMP) targets to Lifecycle
*-composeartifacts. Lifecycle now supports the following platforms in total: JVM (Android and Desktop), Native (Linux, iOS, watchOS, macOS, MinGW), and Web (JavaScript, WasmJS). I0a0e4
Bug Fixes
- Update
androidx.annotationto 1.9.1 Ic9e4f b/397701294
API Changes
- Update Compose to 1.9.0. I2b9de
Bug Fixes
- Fix behavior of FAB in XR NavRail Ibe20b
Bug Fixes
- Fix
IllegalArgumentException("attempt to removeOnFrameMetricsAvailableListenerthat was never added"). No attempt is made to record frame timing when a window isn't hardware accelerated, as this isn't supported byWindow.OnFrameMetricsAvailableListener. I8fef2 b/436880904
New Features
- Added new Kotlin MultiPlatform (KMP) targets to
Navigation3 Runtimeartifacts.Navigation3 Runtimenow supports the following platforms in total: JVM (Android and Desktop), Native (Linux, iOS, watchOS, macOS, MinGW), and Web (JavaScript, WasmJS). I55078 b/424410398 b/419294028 b/419046226. Note: This does not provide KMP targets forNavigation3 UIartifact. On other platforms, you will need to implement your own customNavDisplay. If you would like to see it supported, please vote on the Jetbrains issue here and track the progress for additional support there. - The
NavDisplayInfoobject is now public and can be used to retrieve the list of visible entries from theNavDisplay. Ibc91f
API Changes
- Added a new
NavBackStackSerializerto be used in conjunction withrememberNavBackStackto perform state restoration.rememberNavBackStack()now also takes aSavedStateConfigurationthat can be used to provide your own configuration. I2f4d2 I4cd58 b/420443609
Bug Fixes
- Fixed an issue where navigating would cause incorrect Lifecycle events to fire. I8bf6d b/425901162 b/434109022
Known Issues
- There was a bug introduced by I8bf6d that caused Lifecycles to be based on scenes instead of individual entries, which broke Lifecycle for any cases where the
keyprovided to theNavEntryis not aStringor yourNavEntryhas not overridden thecontentKeyand set it equal to thekey(note that doing this enforces that your key can be saved into aBundle). This has been fixed for the next release. b/440145700
API Changes
- Remove
NavigationEventDispatcher.onHasEnabledCallbacksChanged. I50e97 - Make
NavigationEventCallback.onEventCompleted()abstract. I36b38 - Change
NavigationEventCallback#on*methods toprotected. Update calling code to override them. I6b691 - Rename
DirectNavigationEventInputfunctions. Iffb62 - Rename
NavigationEventInput.onAttachtoonAdded. I2d0b8 - Rename
NavigationEventInput.onDetachtoonRemoved. I2d0b8 - Rename
NavigationEventInputHandlertoNavigationEventInput. I676a4 - Add
@EmptySupertoNavigationEventInput.onHasEnabledCallbacksChanged. If9853 - Implement
onAttachinNavigationEventInputHandler. I03648 - Implement
onDetachinNavigationEventInputHandler. I03648 - Default
NavigationEventCallbackto enabled upon creation. Ic0188 - Replace
NavigationEventInput.addOnHasEnabledCallbacksChangedCallbackwithNavigationEventInput.onHasEnabledCallbacksChanged. I64e93 - Require the main thread for
NavigationEventDispatcher.addInput. Ic2930 - Require the main thread for
NavigationEventDispatcher.removeInput. Ic2930 - Remove
Dispatcher.addOnHasEnabledCallbacksChangedCallback. Replace withDispatcher.onHasEnabledCallbacksChanged. Ida3e3 b/436530096
Bug Fixes
- Fix bug where adding an already-attached handler or removing an unattached one triggered incorrect lifecycle logic. I9e47b
New Features
- Paging-common has added desktop as a new Kotlin Multiplatform (KMP) target. In total it now supports JVM(Android and Desktop), Native (Linux, iOS, watchOS, tvOS, macOS, MinGW), and Web (JavaScript, WasmJS). Id2483 b/436884811
- Paging-testing has added new Kotlin Multiplatform (KMP) targets. In total it now supports JVM(Android and Desktop), Native (Linux, iOS, watchOS, tvOS, macOS, MinGW), and Web (JavaScript, WasmJS). I0c543 b/435014650
- Paging-compose has added new Kotlin Multiplatform (KMP) targets. In total it now supports JVM(Android and Desktop), Native (Linux, iOS, watchOS, tvOS, macOS, MinGW), and Web (JavaScript, WasmJS). I70d44 b/436884801
API Changes
- Moving the default minSdk from API 21 to API 23 Ibdfca b/380448311 b/435705964 b/435705223
API Changes
- Update the minSDK from API 21 to API 23 Ibdfca b/380448311 b/435705964 b/435705223
- Update the minimum Android Gradle Plugin (AGP) version compatible with the Room Gradle Plugin from 8.1 to 8.4. Ia0d28
Bug Fixes
- Fix an issue where a destructive migration was being performed even if a migration path was available for a pre-packaged database b/432634197.
New Features
- Add new Kotlin Multiplatform (KMP) targets to SavedState
*-composeartifact. Lifecycle now supports the following platforms in total: JVM (Android and Desktop), Native (Linux, iOS, watchOS, macOS, MinGW), and Web (JavaScript, WasmJS). /Idcf26
API Changes
- Add support for nullable types in
encodeToSavedStateanddecodeFromSavedState. I79062 b/439527454 - Update Compose to 1.9.0. I2b9de
API Changes
- Update the minSDK from API 21 to API 23 Ibdfca b/380448311 b/435705964 b/435705223
New Features
- A new vertical text library to support vertical text layout mainly for Japanese, by leveraging the new VERTICAL_TEXT_FLAG flag added in Android 16.
- Added
VerticalTextLayoutthat displayed vertical text with proper line breaks, mixed orientation (e.g., horizontal Latin characters within a vertical line), and ruby text. 8b3a10 - Added
FontShearSpanfor italic-like style in vertical text. 1ffd78 - Added
EmphasisRunfor emphasis marks. fe12d9
Important changes since 1.4.0
First release of the Wear Compose Material 3 library, which supports the new Material 3 Expressive design system. This release includes:
- Updated
MaterialThemeand dynamic color theming. - New
AppScaffold, ScreenScaffold,HorizontalPagerScaffold, andVerticalPagerScaffoldcomponents to lay out the structure of the screen and coordinateScrollIndicator,TimeText,HorizontalPageIndicator, andVerticalPageIndicatoranimations. - Shape morphing
IconButton,TextButton,IconToggleButton, andTextToggleButton, with variations that animate when pressed or checked. EdgeButton, which has a special shape designed for the bottom of the screen.ButtonGroupimplements an expressive group of buttons, in a row that shape-morphs when touched.AlertDialogandConfirmationDialogwith variations for additional dialog content.TimePickerandDatePickercomponents.- Progress indicators include
CircularProgressIndicator(with segmented variation),ArcProgressIndicator, andLinearProgressIndicator.
In addition, Wear Compose Foundation 1.5.0 includes the following:
TransformingLazyColumn, a lazy, vertically scrolling list that supports scaling and morphing animations.- Support for paging in Wear Compose Foundation with
HorizontalPagerandVerticalPager. - Hierarchical Focus Groups - used to annotate composables in an application to keep track of the active part of the composition and coordinate focus.
Read about more about (Material 3 Expressive for Wear OS)
Additional changes
- For a more complete list of the features introduced in version 1.5.0, see the (beta01 release notes).
Important changes since 1.4.0
First release of the Wear Compose Material 3 library, which supports the new Material 3 Expressive design system. This release includes:
- Updated
MaterialThemeand dynamic color theming. - New
AppScaffold, ScreenScaffold,HorizontalPagerScaffold, andVerticalPagerScaffoldcomponents to lay out the structure of the screen and coordinateScrollIndicator,TimeText,HorizontalPageIndicator, andVerticalPageIndicatoranimations. - Shape morphing
IconButton,TextButton,IconToggleButton, andTextToggleButton, with variations that animate when pressed or checked. EdgeButton, which has a special shape designed for the bottom of the screen.ButtonGroupimplements an expressive group of buttons, in a row that shape-morphs when touched.AlertDialogandConfirmationDialogwith variations for additional dialog content.TimePickerandDatePickercomponents.- Progress indicators include
CircularProgressIndicator(with segmented variation),ArcProgressIndicator, andLinearProgressIndicator.
In addition, Wear Compose Foundation 1.5.0 includes the following:
TransformingLazyColumn, a lazy, vertically scrolling list that supports scaling and morphing animations.- Support for paging in Wear Compose Foundation with
HorizontalPagerandVerticalPager. - Hierarchical Focus Groups - used to annotate composables in an application to keep track of the active part of the composition and coordinate focus.
Read about more about (Material 3 Expressive for Wear OS)
New Features
- Adds
Profile#preconnectwhich allows apps to open a connection to an origin before navigating to it in order to speed up future loads. I8db41 - A new
prerenderUrlAsyncAPI has been added toWebViewCompat, allowing applications to speculatively prerender URLs before they are displayed in a WebView.
Prerendering can dramatically improve loading performance by fetching the page ahead of time. When the user navigates to the URL, the prerendered page is displayed instantly.
These APIs were previously released as experimental, and can now be used without the@OptInannotation. Ie14f5 - You can now specify a set of profiles to load synchronously when calling the
startUpWebViewAPI. This is configured by passing the profile names to a new method inWebViewStartUpConfig.BuilderI9a6e6 - Add a new API to
WebSettingsCompatto enabled/disable BackForwardCache on theWebSettingsobject. This API was previously released as experimental, and can now be used without the@OptInannotation. Ie413b - Add support for overriding User-Agent form factors, The
UserAgentMetadataclass has new methods to get and set user-agent metadata form factors. TheUserAgentMetadata.Builderhas a newsetFormFactors()method for overriding theSec-CH-UA-Form-FactorsUser-Agent client hint. The current override values can be retrieved via the newgetFormFactors()method. I6d08c b/430554841
API Changes
- Add API to
ProcessGlobalConfigto configureWebView's UI thread initialization I5e85a b/433273850 b/397372092 - Add a new feature name for
WebViewStartupConfig.Builder#setProfilesToLoadDuringStartupAPI I36451 - Moving the default minSdk from API 21 to API 23 Ibdfca b/380448311 b/435705964 b/435705223
- Update origin matched header API to allow overwriting header values by calling
setOriginMatchedHeadermultiple times for the same header name. Also adds a newhasOriginMatchedHeadermethod to check if the header name is already in use.
This change also marks the API as experimental, as it currently only supports setting a single value and origin mapping for each header value, and it will likely undergo changes in the future to make it support multiple values mapped to different origins. I03365 b/419469873 b/429269470 - The UI thread requirement for
Profile#prefetchUrlAsync()has been removed. It can now be called from any thread. I83d57 - The
OutcomeReceiverCompatinterface has been removed in favor of the officialandroidx.core.os.OutcomeReceiverCompatversion. The library now requirescompileSdk35 or higher. Ie1ea5 - Renames
[is/set]IncludeCookiesOnShouldInterceptRequestEnabledto[are/set]CookiesIncludedInShouldInterceptRequestinWebSettingsCompat. Ife9e9 b/428924452 - Adding experimental API annotations to
Profile.ExperimentalUrlPrefetchthat had previously been omitted. Ic54eb b/417458061
Bug Fixes
- Fix for where a
NullPointerExceptioncould occur due to errors on the device implementation. - Fix for where our
ActivityEmbeddingsafety checks would fail due to proguard removing unused classes.
API Changes
- The minSdk has been updated from API 21 to API 23 Ibdfca b/380448311 b/435705964 b/435705223
- The API
setRemoteSessionTimeoutMillisin WorkManager’s Configuration builder has been added to enable configuring the amount of time a RemoteWorkManager session is alive from its last usage. Ib23c8 - Add an experimental API in
WorkRequest.Builderto apply backoff when work is interrupted by the system. Ie2dc7 b/335513480 - Add test API to pass in a different worker class to
TestListenableWorkerBuilderthan the one being built to support customWorkerFactoryimplementations If6bff b/389154854
Bug Fixes
- Cache network capabilities in
SharedNetworkCallbackto prevent unnecessary IPCs Ie4027 b/427115602 - Fix an issue with network constraint evaluation where work items after the first would not get the current network capabilities and would instead hit
ConstraintsNotMetafter a timeout Ib6a66 b/427115602