| Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |
|---|---|---|---|---|
| July 01, 2026 | 1.11.4 | - | 1.12.0-beta02 | - |
Compose is combination of 7 Maven Group Ids within androidx. Each Group
contains a targeted subset of functionality, each with its own set of release
notes.
This table explains the groups and links to each set of release notes.
| Group | Description |
|---|---|
| compose.animation | Build animations in their Jetpack Compose applications to enrich the user experience. |
| compose.compiler | Transform @Composable functions and enable optimizations with a Kotlin compiler plugin. |
| compose.foundation | Write Jetpack Compose applications with ready to use building blocks and extend foundation to build your own design system pieces. |
| compose.material | Build Jetpack Compose UIs with ready to use Material Design Components. This is the higher level entry point of Compose, designed to provide components that match those described at www.material.io. |
| compose.material3 | Build Jetpack Compose UIs with Material Design 3 Components, the next evolution of Material Design. Material 3 includes updated theming and components and Material You personalization features like dynamic color, and is designed to be cohesive with the new Android 12 visual style and system UI. |
| compose.runtime | Fundamental building blocks of Compose's programming model and state management, and core runtime for the Compose Compiler Plugin to target. |
| compose.ui | Fundamental components of compose UI needed to interact with the device, including layout, drawing, and input. |
To add a dependency on Compose, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.
Add the dependencies for the artifacts you need in the build.gradle file for
your app or module:
dependencies { implementation "androidx.compose.ui:ui:1.11.4" } android { buildFeatures { compose true } composeOptions { kotlinCompilerExtensionVersion = "1.5.15" } kotlinOptions { jvmTarget = "1.8" } }
dependencies { implementation("androidx.compose.ui:ui:1.11.4") } android { buildFeatures { compose = true } composeOptions { kotlinCompilerExtensionVersion = "1.5.15" } kotlinOptions { jvmTarget = "1.8" } }
For more information about dependencies, see Add build dependencies.
Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.
See the Issue Tracker documentation for more information.
July 01, 2026
androidx.compose.ui:ui-*:1.12.0-beta02 is released. Version 1.12.0-beta02 contains these commits.
June 17, 2026
androidx.compose.ui:ui-*:1.12.0-beta01 is released. Version 1.12.0-beta01 contains these commits.
API Changes
ComposeUiFlags.isTrackpadPinchReinterpretationEnabled to re-interpret trackpad pinch gestures as mouse events with scale factors. (Id3477, b/478053727)BasicText and BasicTextField where setting a line height for a text with softwrap=false is now calculating more optimally (I2150a)Bug Fixes
ComposeUiFlags.isTrackpadPinchReinterpretationEnabled by default. (I35ab8, b/478053727)<clip-path> elements were ignored if they contained nested <group> elements. (Id4ea9, b/474530439)AndroidComposeTestRule by regenerating the internal test environment and coroutine scope between execution attempts. (Iafaa7, b/235383900)External Contribution
AndroidClipboard interface for testing to provide a way to mock clipboard implementation (Ie4d72, b/512924975)TextAttribute variants of
commitText() and setComposingText(). For SDK>=37, accessibility
services will be able to announce whether or not a suggestion
replacement text is selected. For SDK<37, will not affect spoken
feedback (i.e. existing behavior). (I90e3d, b/439879822)May 19, 2026
androidx.compose.ui:ui-*:1.12.0-alpha03 is released. Version 1.12.0-alpha03 contains these commits.
API Changes
credentialRequest Semantics property and a CredentialRequestData helper on API 34+ to allow Jetpack Compose text fields to integrate with Android's Credential Manager via the Autofill framework. (Ida2bf, b/488446455)ParagraphIntrinsics factory function that takes the softWrap argument among others. Internally, we could use it as a signal that the text is rendered as a single line and perform certain optimisations. (I66ca4, b/485495112)SoundEffectOnInteraction Composable to allow opt-out. Note that as a consequence of this change semantics click listeners must now be called from the main thread, which may effect a small number of test cases. (I78f65)Font factory function taking variationSettings. (I183f2)ResourceFont loadingStrategy property and copy method. (I40d84)InterceptPlatformTextInput and PlatformTextInputInterceptor APIs. (Id2784)registerIdlingResource and unregisterIdlingResource have been moved to extension functions; you may need to update your imports. (I21d3d, b/471148519)runWithoutImplicitWait to ComposeTestRule and ComposeUiTest to improve test performance during state inspection. This API allows to execute a block of code with implicit synchronization disabled, avoiding the overhead of repeated synchronizations for each node query. This results in significantly faster test execution, especially for tests that manually step through frames and sample multiple properties, such as in animation testing. (Ie00e9, b/490270394)@PreviewWrapper annotation can now be applied to MultiPreview annotation classes, allowing developers to create reusable, pre-wrapped preview configurations. (I8ae66, b/511170361)MeshGradientPainter for rendering mesh gradients.Modifier.meshGradient has been removed, use MeshGradientPainter with Modifier.paint instead. MeshGradientRenderer is now internal. (I2d170, b/508110246)isRulerProvided lambda isn't observed and should be optimistic in whether a value can be provided. The rulerProvider lambda is observed so that if any value changes, it will update the ruler value and all readers of the ruler. (Ie9089)playing { } syntax in a MediaPlayer composable). This change breaks binary and source compatibility. The primary change that breaks source compatibility is that helper functions in the StyleScope have moved to be extension functions (e.g. fun contentProperty(all: Dp) is now an extension function). Either importing the required extension functions or by importing all symbols from androidx.compose.foundation.styles should be all that is required get code that calls these methods to compile correctly. (I1ef27, b/493676648)updatePointerBy() with default argument for the pointer id. (I99f30, b/502001776)DeferredTargetAnimation is no longer experimental, please remove opt-in." into androidx-mainisClearNestedScrollCoroutineScopeFixEnabled to control the fix. (Ibd394, b/505343254)DeferredTargetAnimation is no longer experimental, please remove opt-in. (I1e4ae, b/500030165)ComposeViewContext is allowed to be created without the reference View being attached. It still requires that the reference View is attached prior to calling setContent(). (Id0952)Bug Fixes
focusRestorer not properly restoring focus when multiple save calls occur for the same layout (I10277, b/505371994)ComposeViews from being measured. This change now allows it without reintroducing the performance problem. (I9b2c5, b/508650647)ComposeViewContext change to support faster access to the ComposeViewContext. (I3b3a8, b/487364963)External Contribution
androidx.compose.ui.platform.NativeClipboard typealias is deprecated, use android.content.ClipboardManager directly instead (Ibc611)Clipboard.nativeClipboard property to Clipboard.nativeClipboardManager extension to avoid exposing platform type into commonMain sourceset via typealias (Ibc611)May 06, 2026
androidx.compose.ui:ui-*:1.12.0-alpha02 is released. Version 1.12.0-alpha02 contains these commits.
API Changes
MeshGradient Modifier. (Ia9a08, b/455752719)AutofillManager.AutofillCallback. (I631c7, b/502279690)mediaQuery and derivedMediaQuery to return a generic type instead of a Boolean, allowing more flexible usage when building adaptive UIs. (I93830, b/498698350)April 22, 2026
androidx.compose.ui:ui-*:1.12.0-alpha01 is released. Version 1.12.0-alpha01 contains these commits.
API Changes
ComposeUiFlags.isIndirectPointerNavigationGestureDetectorEnabled (I82be3, b/455601135)mediaQuery an inline function (Ie9457, b/498698350)ComposeViewContext has moved out of the experimental stage and the ExperimentalComposeViewContextApi annotation was removed (I32eca)ComposeView.disableWindowInsetsRulers() is now not experimental (Ia81a5)hasPendingWork() API to allow passively checking if the Compose UI currently has pending work without triggering a wait or advancing the clock. This is useful for manual clock tests to determine when animations or other background work have finished. (Ic54e3)AndroidComposeUiFlags.isForceChildLayoutAfterMeasurementEnabled (I7fd25, b/491111451)AndroidComposeUiFlags.isSharedFontEnabled (I2cebe, b/479898293)KeyboardType options to complete the set of supported keyboard options on Android, including date, time, datetime, signed decimal, and more. (I3713e, b/202353328)AndroidComposeUiFlags.isSharedHapticsEnabled flag (I6a1d4, b/479895628)AndroidComposeUiFlags.isSharedClipboardManagerEnabled flag (I41e3c, b/479895130)AndroidComposeUiFlags.isSharedViewConfigurationEnabled flag (I6d3aa, b/479890645)AndroidComposeUiFlags.isSharedDrawingEnabled. (I27912, b/479849019)AndroidComposeUiFlags.isSharedAccessibilityManagerEnabled (I6b726, b/479845566)AndroidComposeUiFlags.isSharedWindowInfoEnabled flag (Ife9a9, b/479837249)AndroidComposeUiFlags.isSharedComposeViewContextEnabled flag. (Ic522a, b/479834257)isTraversableDelegatesFixEnabled (Ia7dfe, b/485962494)runWhenIdle and its suspending variant awaitAndRunWhenIdle on ComposeTestRule and ComposeUiTest to improve test performance and state stability. These APIs synchronize the UI once, then execute a block of code without the overhead of repeated synchronizations for each operation. This results in significantly faster and less flaky test execution, especially for tests that sample many properties, such as in animation testing. (Iabf66, b/490270394)LayerOutsets to GraphicsLayer & Modifier.graphicsLayer which can be used to increase the visual bounds of the layer beyond its measured size. This can be used to avoid the implicit clipToBounds behavior when the layer is promoted to an Offscreen buffer. (Ic1189)ComposeView.setAutofillDebugEnabled. (I5b430, b/487947860)AndroidComposeUiFlags.isFrameworkVelocityTrackerEnabled). (Ibc7e2, b/359962905)AndroidComposeUiFlags.isForceChildLayoutAfterMeasurementEnabled is true, child Views will always have layout called after measurement during a layout pass. Compose doesn't always layout a child after measurement, but Views require it for proper state management. (Ib4fe9, b/430974758)isVirtual to LayoutInfo (I3e5cd, b/494243978)isGraphicsLayerShapeSemanticsEnabled flag. (I44be0, b/455600081)onRootWithViewInteraction to scope Compose semantic searches to specific Android Views . This simplifies testing hybrid UIs, such as RecyclerViews, without requiring unique test tags in production code . (Ic02c4, b/175226753)Bug Fixes
captureToImage() API now allows you to capture a popup or dialog together with its anchor in a single bitmap. (I9b83a, b/443137545)compileSdk to API 37. This means that a minimum AGP version of 9.2.0 is required when using Compose. (Id45cd, b/413674743)ContentDataType.None in semantics now prevents autofill events from being sent by Compose. This should prevent initialization costs associated with requesting autofill services. (I8fbda, b/487947860)July 01, 2026
androidx.compose.ui:ui-*:1.11.4 is released. Version 1.11.4 contains these commits.
June 17, 2026
androidx.compose.ui:ui-*:1.11.3 is released. Version 1.11.3 contains these commits.
May 19, 2026
androidx.compose.ui:ui-*:1.11.2 is released. Version 1.11.2 contains these commits.
May 06, 2026
androidx.compose.ui:ui-*:1.11.1 is released. Version 1.11.1 contains these commits.
April 22, 2026
androidx.compose.ui:ui-*:1.11.0 is released. Version 1.11.0 contains these commits.
April 08, 2026
androidx.compose.ui:ui-*:1.11.0-rc01 is released. Version 1.11.0-rc01 contains these commits.
March 25, 2026
androidx.compose.ui:ui-*:1.11.0-beta02 is released. Version 1.11.0-beta02 contains these commits.
API Changes
PreviewWrapper API for consistency (I62659, b/490085948) ComposeViewContext allows a ComposeView to compose without being attached to the view hierarchy. Use AbstractComposeView.createComposition(composeViewContext) to start composing without the ComposeView being attached. (I46e6f)delayMillis to trackpad test APIs for panEnd and scaleEnd (If80fe)Bug Fixes
Clipboard and ClipboardManager now request the system service on the first method call (If0016, b/487947860)clippingEnabled = false now correctly uses the full window bounds to display edge-to-edge (I206408, b/327017902)March 11, 2026
androidx.compose.ui:ui-*:1.11.0-beta01 is released. Version 1.11.0-beta01 contains these commits.
API Changes
windowToken has been added to Jetpack Compose Dialog (Ic7728)windowToken and windowType has been added to Jetpack Compose Popups. (I0a04f)PreviewWrapper interface and an annotation provider. This will allow developers to seamlessly wrap their previews with custom behavior. (I29f54, b/484306729)AndroidComposeUiFlags.isSharedFontEnabled is true, font-related object instances, like FontLoader and FontFamilyResolver, can be shared across ComposeView instances inside ComposeViewContext. (I403e8)mainLooper, avoiding crashes in views that use non-main handlers. (I671c3, b/486235925)isSkipNonImportantSemanticsNodesHitTestEnabled flag that guards a bug fix for semantics hit testing, which affects TalkBack's touch-to-explore. (I2933f, b/481011169, b/454377558, b/461360154)windowType parameter in DialogProperties, developers can now show Dialogs in overlay windows. (I7c504, b/478214962)PointerInputChange and HistoricalChange properties for retrieving scale and pan values. (I989a8, b/481333653)PointerEventType.Pan and into PointerEventType.PanStart, PointerEventType.PanMove and PointerEventType.PanEnd. Similarly, PointerEventType.Scale is split into PointerEventType.ScaleStart, PointerEventType.ScaleChange and PointerEventType.ScaleEnd. This split allows passing through additional information about the start and end of platform-interpreted pan and scale gestures, which then allows pointer input handlers in Compose to use this information to detect events appropriately, and especially know when a pan or scale is done. (I4daf6, b/479285849, b/481333653)AndroidComposeUiFlags.isSharedHapticsEnabled is true, ComposeViewContext contains the shared haptics controller instance. (Icd79a)mediaQuery,derivedMediaQuery and UiMediaScope APIs (marked as @ExperimentalMediaQueryApi) to enable declarative adaptive UI development based on window dimensions, window posture, and other device and environment capabilities. (I2d21e, b/479800750)Bug Fixes
Modifier.dropShadow and Modifier.innerShadow would not redraw when the Shape parameter was dynamically changed. (Ida262, b/486202623)ComposeView is used in a fragment transition, an exception was being thrown. (Ia425f, b/484100557)External Contribution
InputTextSuggestionState property to help identify the different states a transliteration input can be in when text replacement suggestions are available. Also introduces TextCompositionRange to track the range of the current transliteration text composition range; a null value indicates no composition in place. (I7a67f, b/476472318)February 25, 2026
androidx.compose.ui:ui-*:1.11.0-alpha06 is released. Version 1.11.0-alpha06 contains these commits.
API Changes
ComposeUiFlags.areWindowInsetsRulersEnabled flag has been replaced with the ComposeView.disableWindowInsetsRulers() API. (Idcdb4, b/455590696)isAccessibilityShowOnScreenNestedScrollingEnabled to (I1c13a)AndroidComposeUiFlags.isSharedClipboardManagerEnabled is true, clipboard-related instances can be shared across ComposeViews
using ComposeViewContext (I65e2c)ComposeUiFlags.isRectManagerOffsetUsageFromLayoutCoordinatesEnabled was removed (I6e14a, b/455601894)February 11, 2026
androidx.compose.ui:ui-*:1.11.0-alpha05 is released. Version 1.11.0-alpha05 contains these commits.
API Changes
AndroidComposeUiFlags.isSharedWindowInfoEnabled moves the WindowInfo information to ComposeViewContext. Disabling the flag leaves WindowInfo controlled by AndroidComposeView (I3b364)ComposeView will be moved to the shared ComposeViewContext. This is the first change that moves the CoroutineContext to ComposeViewContext. When AndroidComposeUiFlags.isSharedComposeViewContextEnabled is true, values are automatically shared. When false, they are not shared. (I9364d, b/461566955)Bug Fixes
CONTENT_CHANGE_TYPE_CHECKED for Toggleable property change. (I6ac64, b/476894689, b/474538004, b/475754416)External Contribution
androidx.compose.ui.graphics.NativePaint typealias is deprecated, use android.graphics.Paint directly instead (I6303c, b/477394763)Paint.asFrameworkPaint() to Paint.nativePaint extension to avoid exposing platform type into commonMain sourceset via typealias (I6303c, b/477394763)NumPad movement keys (I1ff12)January 28, 2026
androidx.compose.ui:ui-*:1.11.0-alpha04 is released. Version 1.11.0-alpha04 contains these commits.
API Changes
TestCoroutineScheduler to enable usage of runCurrent() and ensure access to the shared scheduler instance. (Iea662, b/254115946)android.R.id.accessibilityActionShowOnScreen from Accessibility. (Ib2723, b/431148846)Bug Fixes
January 14, 2026
androidx.compose.ui:ui-*:1.11.0-alpha03 is released. Version 1.11.0-alpha03 contains these commits.
API Changes
ComposeUiTestFlags.isStandardTestDispatcherSupportEnabled flag. The v2 run*ComposeUiTest and create*ComposeRule APIs now use StandardTestDispatcher by default. To continue using UnconfinedTestDispatcher, you can use the deprecated API variants; however, we strongly recommend migrating to the v2 APIs for better control over coroutine execution. (Iecc9c, b/455601592)androidx.compose.ui.test.junit4.v2.create*ComposeRule APIs. These new APIs use a StandardTestDispatcher by default to better simulate production behavior where coroutines are queued rather than executed immediately. See the migration guidance for more information. (I1870e, b/254115946)androidx.compose.ui.test.v2.run*ComposeUiTest APIs. These new APIs use a StandardTestDispatcher by default to better simulate production behavior where coroutines are queued rather than executed immediately. See the migration guidance for more information. (I4f782, b/254115946)ComposeView can now be shared. When ComposeUiFlags.isSharedComposeViewContextEnabled is true, values are automatically shared. When false, they are not shared. (I0d1b4, b/463540495, b/460468959, b/461503366, b/463641813)Bug Fixes
ComposeView doesn't remove the drawn content. (I8b382, b/299503084)LookaheadScope. (I7e649, b/469669851)Popup where absolute coordinates of the anchor bounds were being passed to the PopupPositionProvider, leading to incorrect popup placements. Popup positioning calculations now use the correct relative coordinates.(1f7edf,b/469940907)December 17, 2025
androidx.compose.ui:ui-*:1.11.0-alpha02 is released. Version 1.11.0-alpha02 contains these commits.
API Changes
MultiModalInjectionScope APIs are now stable. This includes performKeyInput and performRotaryScrollInput, and their underlying key and rotary APIs. The experimental annotation has been removed. (Ie8bbc, b/261561237)SemanticsNodeInteraction.performTrackpadInput and MultiModalInjectionScope.trackpad (I2ce67), b/432326139.Bug Fixes
December 03, 2025
androidx.compose.ui:ui-*:1.11.0-alpha01 is released. Version 1.11.0-alpha01 contains these commits.
API Changes
isSemanticAutofillEnabled UI flag as semantic autofill has been enabled by default. (I849cf, b/455587954)findNearestAncestor discovers relevant nodes. Now delegates of the same type (NodeKind) will be visible during the traversal. The change is guarded by the flag isTraversableDelegatesFixEnabled. (Ia3165, b/280804097)TextEntryKey mapping for ANI#isTextEntryKey (Ifde7b, b/399540654)Modifier.onFirstVisible() is deprecated as its behavior is misleading and doesn't always follow the contract claimed by the name. For example, when it is added on an item of LazyColumn, this callback will be called everytime this item became visible after scrolling. It is not what the users of the modifier with this name might have expected. It is recommended to use Modifier.onVisibilityChanged() instead and manually track if the layout was visible already previously based on the requirement of the specific use case. (Ia7095, b/447601783)MeasuredSizeAwareModifierNode, which is needed when you need onRemeasured() callback. Please use this interface directly instead of using more generic LayoutAwareModifierNode when you don't need other callbacks. (If6fb0)March 25, 2026
androidx.compose.ui:ui-*:1.10.6 is released. Version 1.10.6 contains these commits.
March 11, 2026
androidx.compose.ui:ui-*:1.10.5 is released. Version 1.10.5 contains these commits.
February 25, 2026
androidx.compose.ui:ui-*:1.10.4 is released. Version 1.10.4 contains these commits.
February 11, 2026
androidx.compose.ui:ui-*:1.10.3 is released. Version 1.10.3 contains these commits.
January 28, 2026
androidx.compose.ui:ui-*:1.10.2 is released. Version 1.10.2 contains these commits.
January 14, 2026
androidx.compose.ui:ui-*:1.10.1 is released. Version 1.10.1 contains these commits.
Bug Fixes
LookaheadScope (I7e649, b/469669851)Popup where absolute coordinates of the anchor bounds were being passed to the PopupPositionProvider, leading to incorrect popup placements. Popup positioning calculations now use the correct relative coordinates.(1f7edf,b/469940907)December 03, 2025
androidx.compose.ui:ui-*:1.10.0 is released. Version 1.10.0 contains these commits.
November 19, 2025
androidx.compose.ui:ui-*:1.10.0-rc01 is released. Version 1.10.0-rc01 contains these commits.
Bug Fixes
visibilityChanged callbacks with false when minDurationMs is not zero. (2ac08b8, b/456384555)onVisibilityChanged callback when the node is initially not visible. (3969e8d, b/447364998)November 05, 2025
androidx.compose.ui:ui-*:1.10.0-beta02 is released. Version 1.10.0-beta02 contains these commits.
October 22, 2025
androidx.compose.ui:ui-*:1.10.0-beta01 is released. Version 1.10.0-beta01 contains these commits.
API Changes
isOptimizedFocusEventDispatchEnabled = false (I919fb, b/449228515)TextDirection, TextAlign, Hyphens, FontSynthesis valueOf functions now throw IllegalArgumentException when they receive an unknown value. (I07c67)CompositionDataTree.makeTree to pass default values instead of wrapper function. (Id64a6, b/445229688)createComposeRule, createAndroidComposeRule and createEmptyComposeRule which accept the effectContext parameter are stable and the parameter defaults to EmptyCoroutineContext. (If400c, b/450540702)UnplacedStateAwareModifierNode was renamed to UnplacedAwareModifierNode (I6a551, b/449719932)ComposeUiFlags.isRectManagerOffsetUsageFromLayoutCoordinatesEnabled feature flag. It enabled performance optimization where coordinates requests like LayoutCoordinates.positionInRoot() are using the cached offsets we already have in RectManager, instead of traversing the whole tree on each call. (Ieaadc)Bug Fixes
PlaceholderSpan now correctly uses non-linear font scaling for sizing (Id2ead, b/324462728)ViewCompat to perform haptic feedback constants supported at the platform level, relying on its fallback support for newer constants. (Ib5a00)October 08, 2025
androidx.compose.ui:ui-*:1.10.0-alpha05 is released. Version 1.10.0-alpha05 contains these commits.
Bug Fixes
External Contribution
UiModes object is renamed to AndroidUiModes to reflect that its constants are lifted from Android API. (Ia0a77)September 24, 2025
androidx.compose.ui:ui-*:1.10.0-alpha04 is released. Version 1.10.0-alpha04 contains these commits.
API Changes
CoroutineContext parameter has been promoted to stable. The experimental annotation has been removed, and developers no longer need to opt-in to use this API. (I74e6e)ComposeUiFlags.isRectTrackingEnabled was removed. This logic is not always enabled. (Id78df)Updater#set as they were boxing provided value too many times (Id679e)onAutofillText semantic property as deprecated. (I6f81c)UnplacedStateAwareModifierNode was introduced. It provides a callback called when the previously placed layout is not placed anymore. (I8fdd8, b/309776096)RetainObserver.onRetained and added RetainObserver.onUnused, which mirrors RememberObserver.onAbandoned. (Ia6fc5)onVisibilityChangedNode(), which is producing a Modifier.Node, used by Modifier.onVisibilityChanged() via delegation, which allows to expand on top of this functionality in your custom Modifier.Node. (I70d84, b/443001320)Bug Fixes
September 10, 2025
androidx.compose.ui:ui-*:1.10.0-alpha03 is released. Version 1.10.0-alpha03 contains these commits.
API Changes
DelegatableNode.invalidateLayoutForSubtree to DelegatableNode.invalidateMeasurementForSubtree. (I94257, b/430106107)isInHiddenAccessibilitySubtree matcher. (I4476c, b/443792965)Modifier.skipToLookaheadSize now uses a default enabled lambda that only enables the size skipping when shared transition is active, same as Modifier.skipToLookaheadPosition. (Ibe0f5, b/432485585)ComposeUiFlags.isOutOfFrameDeactivationEnabled is removed and this functionality is now always enabled. (I421ed)FillableData instances to companion object. Instead of calling FillableData(value), use the new factory methods: FillableData.createFrom(value). (I2e200, b/441719650)BeyondBoundsLayoutModifierNode a new Modifier node to perform beyond bound layout for focus search. (I39be1, b/416133658)FocusTargetModifierNode.requestFocus() sends focus to one of its children when it is not itself focusable. This is now consistent with FocusRequester.requestFocus() and FocusRequesterModifierNode.requestFocus(). If you do not need this behavior, set the ComposeUiFlags.isRequestFocusOnNonFocusableFocusTargetEnabled flag to false in your app. (Icca5c, b/436863604)WindowInfo (I9322b, b/424442112)isNestedScrollDispatcherNodeFixEnabled. (If451a)FillableData API. val dateMillisValue: Long added to retrieve date information, and a corresponding FillableData(dateMillisValue: Long) constructor added to create date-based FillableData instances. (Id072a)External Contribution
UiModes object is introduced to declare constants that are used for UiMode annotation (I03cb8)August 27, 2025
androidx.compose.ui:ui-*:1.10.0-alpha02 is released. Version 1.10.0-alpha02 contains these commits.
API Changes
FillableData to support non-text components such as toggles and lists, including boolean and integer values inside FillableData and factory constructors to create boolean and list instances of FillableData that translate to the platform’s AutofillValue. The relevant semantic property and action also are added. (Ia8105, Icc5cf)ComposeUiFlags.isInitialFocusOnFocusableAvailable. (Ib9178)isPointerInteropFilterDispatchingFixEnabled. (Iaa589)isNestedScrollInteropPostFlingFixEnabled. (I2a756)isHiddenFromAccessibility() and isInHiddenAccessibilitySubtree() semantics matchers. (I9f5a1)runCurrent() to MainTestClock to run all due tasks on the underlying scheduler. This is to support running tests on a StandardTestDispatcher, 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 a StandardTestDispatcher by creating a ComposeTestRule and passing a StandardTestDispatcher to it. By default, tests are run on an UnconfinedTestDispatcher, in which case runCurrent() will never have to be called.StandardTestDispatcher. Historically, the test framework was (and still is) set up using an UnconfinedTestDispatcher, which differs from a production environment in subtle ways. You can now change this setup by creating your own StandardTestDispatcher and adding it to the effectContext when creating your ComposeTestRule (or when calling runComposeUiTest ). (I334d0, b/254115946)SlotTree. (I997d3)Bug Fixes
RetainScopes on Android. The default behavior will now persist retain-ed values across configuration changes. (Id4a09, b/177562901)External Contribution
VelocityTracker to calculate the velocity of a pointer based on tracked pointer events using platform-specific behavior. (I621e8)August 13, 2025
androidx.compose.ui:ui-*:1.10.0-alpha01 is released. Version 1.10.0-alpha01 contains these commits.
API Changes
ComposeView will now clear focus automatically if the pointer down doesn't occur in the bounds of the focused node. This results in a "tap-to-clear focus" UX that is more expected than current behavior when using pointer input devices. This behavior can be opt-ed out of with a new AbstractComposeView.isClearFocusOnPointerDownEnabled API. (I6322b, b/282963174)FillableData interface to support various autofill component types, in addition to Text. (If9bd2)LayoutCoordinates of a LookaheadScope. (I18dd4, b/409819304, b/395670637)isNestedScrollInteropIntegerPropagationEnabled to control the experiment of dispatching correct integers to nested scroll interop. (If8316)requestFocusForChildInRootBounds() to DelegatableNode to move focus to a child that overlaps with the given rect. (I001ef)isOnScrollChangedCallbackEnabled, isAdjustPointerInputChangeOffsetForVelocityTrackerEnabled, isFlingContinuationAtBoundsEnabled, isAutomaticNestedPrefetchEnabled, DragGesturePickUpEnabled, isPointerInteropFilterDispatchingFixEnabled, isNestedScrollInteropPostFlingFixEnabled, isNestedScrollDispatcherNodeFixEnabled (I36c18)@CheckResult annotation on the SemanticsNode finder and selector functions to enforce usage of returned values. (I6f86e, b/201652748)CompositionLocal that can be used to modify the brush of Autofill's successful filling highlight. (I52329)MouseInjectionScope. We also introduced a new overload for scroll methods in MouseInjectionScope and a flag to control the new behavior called isMouseWheel1DAxisLockingEnabled (I136df)DeviceConfigurationOverrides for keyboard type & state, navigation type and state, touchscreen state, and UI mode type (I282f0)LineHeightStyle.Mode called Tight. This mode helps enforce smaller line heights even when they may possibly cut taller glyphs. (Id3849)BaselineShift now has an Unspecified value to prevent boxing BaselineShift, Hyphens, LineBreak, TextAlign, and TextDirection now have isSpecified helper functions Hyphens, TextAlign, TextDecoration, and TextDirection now have valueOf() and value methods enabling efficient serialization/deserialization. (I8d44c)getDisplayName method interface to allow custom display names for preview parameter instances. (I19bdf, b/241699422)Dp.compareTo(Unspecified) always returns 0. Setting the flag ComposeUiUnitFlags.isDpCompareToChanged to false will return Dp.compareTo() to is former behavior, where comparing Unspecified with less-than and greater-than don't always return false, and compareTo() with Unspecified matches the behavior of Float.compareTo(). (Ifa88b, b/429221319)Bug Fixes
AndroidComposeViews while a transition is ongoing. (I2e23e, b/340894487, b/287484338)fillColor is neither fully opaque nor fully transparent. (I3b041, b/328677973)painterResource with theme-specific colors didn't update on theme changes. (I85ea0, b/424416571)onFillData and fillableData semantics (I45d9e)StateRestorationTester. This aligns test behavior with real application state restoration, such as Parcelization on Android. (I38211, b/408154192, b/382294247)November 19, 2025
androidx.compose.ui:ui-*:1.9.5 is released. Version 1.9.5 contains these commits.
October 22, 2025
androidx.compose.ui:ui-*:1.9.4 is released. Version 1.9.4 contains these commits.
Bug Fixes
onLayoutRectChanged modifier callbacks were not always being called when debounceMillis is not zero. (72aba47, b/445324854)October 08, 2025
androidx.compose.ui:ui-*:1.9.3 is released. Version 1.9.3 contains these commits.
Bug Fixes
onVisibilityChanged/onFirstVisible/onLayoutRectChanged modifiers were not receiving callbacks if the layout being moved has over 170 descendants. (4f2fdd, b/445356774)September 24, 2025
androidx.compose.ui:ui-*:1.9.2 is released. Version 1.9.2 contains these commits.
Bug Fixes
Modifier.onVisibilityChanged() now correctly fires when a node is detached or reused. (Ic5ce20)Modifier.onVisibilityChanged() and onLayoutRectChanged() now properly handles parent layouts using placeWithLayer() to place children. (Ia05ac9)Modifier.onVisibilityChanged() and onLayoutRectChanged(), properly notify in corner cases like removing a layer/layer modifier or updating layer properties. (Ia05ac)September 10, 2025
androidx.compose.ui:ui-*:1.9.1 is released. Version 1.9.1 contains these commits.
Bug Fixes
fillColor is neither fully opaque nor fully transparent. (I3b041, b/328677973)August 13, 2025
androidx.compose.ui:ui-*:1.9.0 is released. Version 1.9.0 contains these commits.
Important changes since 1.8.0
android.experimental.lint.version=8.8.2 (or a newer version) in your gradle.properties. To run Compose lint checks inside the IDE, Android Studio Ladybug or newer is required.graphicsLayer modifier nodes now implements SemanticsModifierNode. This can result in new SemanticsNodes added to the semantics tree and, therefore, lead to test failures in tests that make assumptions about the semantics tree structure. For example, tests that use onChild, onParent, onSibling, and other similar methods to make assertions can fail if a new node is added between the current and target nodes. The preferred way to fix these failures is to add a testTag to the target node directly. Another approach is to use a looser matcher, such as onNode(hasAnyAncestor(hasText("ancestor")) and hasText("target")). (I638b5)July 30, 2025
androidx.compose.ui:ui-*:1.9.0-rc01 is released. Version 1.9.0-rc01 contains these commits.
Bug Fixes
painterResource with theme-specific colors didn't update on system theme changes. (I85ea0, b/424416571)onLayoutRectChanged modifiers get called back initially. (l9aa91), (lb348a)onLayoutRectChanged modifiers to be called with wrong coordinates (ibd4cd), (lddc57)onLayoutRectChanged modifiers (lddc57, b/426750475)External Contribution
dragAndDropSource items in LazyList disappear when scrolled. Thanks Victor Rendina! (dc3bcd3, b/425894792)July 16, 2025
androidx.compose.ui:ui-*:1.9.0-beta03 is released. Version 1.9.0-beta03 contains these commits.
Bug Fixes
July 2, 2025
androidx.compose.ui:ui-*:1.9.0-beta02 is released. Version 1.9.0-beta02 contains these commits.
API Changes
isTrackFocusEnabled experimental flag (I003fd)Bug Fixes
WindowInsets enchroach on the content of the ComposeView, WindowInsetsRulers values are not provided. (I71221)June 18, 2025
androidx.compose.ui:ui-*:1.9.0-beta01 is released. Version 1.9.0-beta01 contains these commits.
Breaking Changes
graphicsLayer modifier nodes now implements SemanticsModifierNode. This can result in new SemanticsNodes added to the semantics tree and, therefore, lead to test failures in tests that make assumptions about the semantics tree structure. For example, tests that use onChild, onParent, onSibling, and other similar methods to make assertions can fail if a new node is added between the current and target nodes. The preferred way to fix these failures is to add a testTag to the target node directly. Another approach is to use a looser matcher, such as onNode(hasAnyAncestor(hasText("ancestor")) and hasText("target")). (I638b5)API Changes
ShadowContext to be a sealed interface (I3ce40)IndirectTouchEvent.nativeEvent experimental. (I6fda5)FrameRateCategory.NoPreference constant. Rename Modifier.requestedFrameRate to Modifier.preferredFrameRate. (I2f976)WindowInsetsRulers: changed rulersIgnoringVisibility to maximum. Changed getDisplayCutoutBounds() to be an extension function of PlacementScope. WindowInsetsAnimationProperties has been changed to WindowInsetsAnimation and the getAnimationProperties() has been changed to getAnimation(). (I3816f)ShadowParams to Shadow (I11cca)androidx.compose.ui.ui to androidx.compose.ui (I8994e)InsetsRulers to be in common code with the name WindowInsetsRulers. Simplified the API so all insets are WindowInsetsRulers. Extracted non-rulers animation properties to an AnimationProperties class. WindowInsetsRulers.innermostOf() can be used to merge multiple WindowInsetsRulers. (I2f0c6, b/415012444)Bug Fixes
isGetFocusedRectReturnEmptyEnabled has been removed now that the feature has been fully verified. (Ife722)performScrollToNode, which in some cases was not reaching the target node. With this fix, it should always reach the target node in those cases. A side effect of this change is that the exact scroll position at the end of the action may now be different, which affects screenshot tests and tests that make assumptions about the exact scroll position. (I2c8a1)June 4, 2025
androidx.compose.ui:ui-*:1.9.0-alpha04 is released. Version 1.9.0-alpha04 contains these commits.
API Changes
SemanticsModifierNode.isImportantForBounds property that determines whether the node should be taken into account when computing bounds. The property is true by default and can be set to false to indicate that the node should not be taken into account for bounds. (I7ebec)SemanticsPropertyKey factory function for declaring Android-specific semantics properties that are made available as accessibility extras exposed via AccessibilityNodeInfo.getExtras. (I2ed51)ComposeUiFlags.isRemoveFocusedViewFixEnabled and deprecated the flag. (I50328)DropShadowPainter and InnerShadowPainter as well as the DropShadow/InnerShadow dependencies. Shadow infrastructure is shared such that the same generated shadows can be shared at multiple callsites without having to re-generate the shadows n-times. (I24f7a, b/160665122)CompositeShader and CompositeShaderBrush which creates a composited result between two shaders. Also add ShaderBrush#transform to set a transformation matrix for the shader. (I2621a, b/160665122)Bug Fixes
NestedScrollInteropConnection where fling methods were being in the wrong order with respect to views. (I56ad4)decorFitsSystemWindows = false and usePlatformDefaultWidth = false can take the display cutout region. (I9e975)TalkBack’s green focus indicator was not drawn after being turned on while the Compose app is in the background. (Ifd12a)May 20, 2025
androidx.compose.ui:ui-*:1.9.0-alpha03 is released. Version 1.9.0-alpha03 contains these commits.
API Changes
ComposeUiFlags.isGetFocusedRectReturnEmptyEnabled makes it so that when nothing is focusable in a ComposeView, it sets the rect to an Empty value. This prevents a focus search from choosing the View to focus on. This is especially important for when an IME has a NEXT option where it might try to focus on the ComposeView and requestFocus() fails. (Ibd0e2, b/369256395)isNestedScrollDispatcherNodeFixEnabled. (I0d24a)DialogProperties' dialogContentTitle to windowTitle (Ibd27b)Modifier.onFirstVisible and Modifier.onVisibilityChanged modifiers were introduced, which are high level modifiers built on top of Modifier.onLayoutRectChanged. These modifiers are built specifically to handle a lot of common application requirements such as logging impressions, auto playing videos, etc. These have been built with performance in mind so that they can be used in critical list-based scenarios without risk of sacrificing scroll performance. In addition to these modifier APIs, additional APIs to RelativeLayoutBounds have been added in order to support these use cases, as well as make it easier for developers to easily create similar custom modifiers that suit their use case exactly. (I759b8)setDiagnosticStackTraceEnabled to experimental to account for future development of this feature. (I11db3)Modifier.scrollable2D, Scrollable2DState and companion APIs for state creation. Also introduced common scroll extension functions. (Ic61c8, b/214410040)ColorLongs because the color space IDs are out of order for some color spaces. To convert to and from Android color spaces, two new APIs are added: toColorLong() and fromColorLong(). (I36899)ViewConfiguration.minimumFlingVelocity to allow lower bound fling velocity control. (I11aab)May 7, 2025
androidx.compose.ui:ui-*:1.9.0-alpha02 is released. Version 1.9.0-alpha02 contains these commits.
API Changes
dialogContentTitle to DialogProperties, which sets the content window title. bf9d670Bug Fixes
VelocityTracker in DragGestureNode, this can be controlled with the new flag isAdjustPointerInputChangeOffsetForVelocityTrackerEnabled.254ddbApril 23, 2025
androidx.compose.ui:ui-*:1.9.0-alpha01 is released. Version 1.9.0-alpha01 contains these commits.
Behavior Changes
android.experimental.lint.version=8.8.2 (or a newer version) in your gradle.properties. To run Compose lint checks inside the IDE, Android Studio Ladybug or newer is required.API Changes
InnerRectRulers and OuterRectRules to be methods instead. Removed name parameter from RectRulers public API. DerivedRulers is now a constructor option for Vertical and Horizontal Rulers. MergedHorizontalRulers and MergedVerticalRulers have been replaced with minOf and maxOf methods to generate instances. (Iee89f, b/408192133)androidx.compose.ui.LocalSavedStateRegistryOwner in favor of androidx.savedstate.compose.LocalSavedStateRegistryOwner. (I5439f, b/377946781)Modifier.keepScreenOn to set the display to not sleep while present (Ib5af4, b/408284174)Shape, which may be set when the shape of the UI element is different from its bounding rectangle, e.g., rounded corner rectangle. (I1376f)AndroidViews and added flag isPointerInteropFilterDispatchingFixEnabled to protect changes. (I0e272, b/372055500, b/408002332)FocusRestorer no longer pins the previously focused item. Users should use a key to ensure that the previously focused item has the same composition hash, so that focus is successfully restored. (I4203b, b/330696779)ViewTreeObserver.OnScrollChanged. This behavior is introduced under the flag isOnScrollChangedCallbackEnabled. We also introduced an extension function of DelegatableNode dispatchOnScrollChanged. (I34b9d, b/238109286)currentCompositeKeyHash is now deprecated. Use currentCompositeKeyHashCode instead. The replacement API encodes the same hash with more bits, which exponentially reduces the chance of two random unrelated groups in the composition hierarchy from having the same hash key. (I4cb6a, b/177562901)FocusRequester to make sure it is remembered inside composition (I6bf91)MotionEvent on Android. (I17286)getChecked() + setChecked(int), deprecate isChecked + setChecked(boolean) (Iaac9d)graphicsLayer modifier now accepts a blendMode and a colorFilter (Iab0e6)LocalResources composition local to query Resources. Calling LocalResources.current will recompose when the configuration changes, so calls to APIs such as stringResource() will return updated values. (I50c13, b/274786917)GlobalAssertions API. Its intended use was to run accessibility checks, see enableAccessibilityChecks()
for that purpose instead. (I50aa5)SemanticsNodeInteraction.performTextInputSelection is no longer experimental and now supports an additional relativeToOriginal parameter which allows you to apply the selection to either the original untransformed text or the transformed text. (I3a905, b/261561038, b/277018945)AnnotatedString (I1d066, b/383269496, b/139326648)runWithTimingDisabled in favor of runWithMeasurementDisabled, which more clearly describes the behavior - all metrics are paused. Additionally, expose the MicrobenchmarkScope superclass since redeclaring the runWithMeasurementDisabled function to open access isn't possible, since it's inline. (I9e23b, b/389149423, b/149979716)Trace.setCounter. (Idcf48)Bug Fixes
android:dialogTheme can now be set to control dialog properties when decorFitsSystemWindows is false (I7922f, b/246909281)android.experimental.lint.version=8.8.2 in gradle.properties to upgrade the Lint version, without affecting AGP. (I6f2a8)InputText that captures a textfield's value before output transformation is applied. (Iae46a, b/395911609, b/176949051)enableAccessibilityChecks() API that turns on the Accessibility Checks for Android to separate packages which are compose:ui:ui-test-accessibility if you're not using the TestRule and compose:ui:ui-test-junit4-accessibility when calling on TestRule (I3c318, b/391560768)LaunchedEffect and rememberCoroutineScope (I705c0, b/354163858)External Contribution
runComposeUiTest function to accept a suspend block. Also added a deprecated fun runComposeUiTest for binary compatibility (I3b88c, b/361577328)June 18, 2025
androidx.compose.ui:ui-*:1.8.3 is released. Version 1.8.3 contains these commits.
Bug Fixes
isGetFocusedRectReturnEmptyEnabled has been removed now that the feature has been fully verified. (Ife722)ComposeUiFlags.isGetFocusedRectReturnEmptyEnabled makes it so that when nothing is focusable in a ComposeView, it sets the rect to an Empty value. This prevents a focus search from choosing the View to focus on. This is especially important for when an IME has a NEXT option where it might try to focus on the ComposeViewand requestFocus() fails. (Ibd0e2, b/369256395)May 20, 2025
androidx.compose.ui:ui-*:1.8.2 is released. Version 1.8.2 contains these commits.
Bug Fixes
onLayoutRectChange not updating per throttled timeline when draw-only updates occur. (03b82d)May 7, 2025
androidx.compose.ui:ui-*:1.8.1 is released. Version 1.8.1 contains these commits.
Bug Fixes
onLayoutRectChanged and LazyLayout d791b11April 23, 2025
androidx.compose.ui:ui-*:1.8.0 is released. Version 1.8.0 contains these commits.
Important changes since 1.7.0
Confirm, ContextClick, GestureEnd, GestureThresholdActivate, Reject, SegmentFrequentTick, SegmentTick, ToggleOn, ToggleOff, VirtualKey. This is accessible via LocalHapticFeedback and on Android, this is available by default when the Vibrator API indicates that haptics are supported.Modifier.focusRestorer() and onEnter and onExit FocusProperties (I6e667). You can now specify a FocusDirection when you call requestFocus. We have added a requestFocus(FocusDirection) API to both focusRequester and FocusTargetModifierNode to allow focusing with a specific direction. (I5d9ec][https://android-review.googlesource.com/#/q/I5d9eca3a2cd283c1b84ad6b77d929ef9a49ce4cc], b/245755256)April 9, 2025
androidx.compose.ui:ui-*:1.8.0-rc03 is released. Version 1.8.0-rc03 contains these commits.
Bug Fixes
March 26, 2025
androidx.compose.ui:ui-*:1.8.0-rc02 is released. Version 1.8.0-rc02 contains these commits.
Bug Fixes
March 12, 2025
androidx.compose.ui:ui-*:1.8.0-rc01 is released. Version 1.8.0-rc01 contains these commits.
Bug Fixes
AndroidView is removed with the soft keyboard active. (Ic725a)LaunchedEffect to request focus on a text field. (b/392539099)February 26, 2025
androidx.compose.ui:ui-*:1.8.0-beta03 is released. Version 1.8.0-beta03 contains these commits.
API Changes
enableAccessibilityChecks() API that turns on the Accessibility Checks for Android to separate packages which are compose:ui:ui-test-accessibility if you're not using the TestRule and compose:ui:ui-test-junit4-accessibility when calling on TestRule (I547ef, b/391560768)InputText that captures a textfield's value before output transformation is applied. (Iae46a)Bug Fixes
February 12, 2025
androidx.compose.ui:ui-*:1.8.0-beta02 is released. Version 1.8.0-beta02 contains these commits.
New Features
Configuration#screenWidth/heightDp - LocalWindowInfo.current.containerSize can be used instead to retrieve the current window size.January 29, 2025
androidx.compose.ui:ui-*:1.8.0-beta01 is released. Version 1.8.0-beta01 contains these commits.
API Changes
ContextualFlowRow and ContextualFlowColumn have 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.
FlowRow and FlowColumn have experimental overloads that were introduced in 1.7 that include an overflow parameter. 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.ContextualFlowRow can be accomplished using FlowRow, but we acknowledge that is not true in full generality. ContextualFlowRow is 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. Use SemanticsNodeInteraction.fetchSemanticsNode().id instead. (Ie397a)requestAutofill API to exist outside of autofill manager. (Id1929)Bug Fixes
requestFocus() with a nonsensical previouslyFocusedRect parameter (related to the focus direction) would skip past a ComposeView. (Ifdc2f, b/388590015)GraphicsLayer.record { this@ContentDrawScope.drawContent() }. If you are recording drawContent() in this way, make sure to use the GraphicsLayer#record extension function inside DrawScope, and not the member function on GraphicsLayer. (I75fc0, b/389046242)January 15, 2025
androidx.compose.ui:ui-*:1.8.0-alpha08 is released. Version 1.8.0-alpha08 contains these commits.
API Changes
AutofillManager an abstract class. (I0a3b0)ComposeView without focusable items, focus change within child AndroidViews, and focus request leaving an AndroidView. (Ia03c3, b/369256395, b/378570682, b/376142752)FocusEnterExitScope.cancelFocus() to cancelFocusChange() (I89959)RectInfo.calculateOcclusions().DelegatableNode to register a listener for global layout changes. (I68b59)Bug Fixes
ComposeContentTestRule.setContent now uses the theme Theme.Material.Light.NoActionBar, to avoid the ActionBar from overlapping with test content when targeting SDK 35. To opt out of this behavior, you can remove the dependency on ui-test-manifest and add an activity entry in your test app's AndroidManifest.xml for ComponentActivity with the theme of your choice. (I7ae1b, b/383368165)AnnotatedString.fromHtml now supports <ul>/<li> tags. (I7c2fe, b/299662276, b/139326648)External Contribution
December 11, 2024
androidx.compose.ui:ui-*:1.8.0-alpha07 is released. Version 1.8.0-alpha07 contains these commits.
API Changes
LayoutNode for tools. (I26f7f)LocalAutofillHighlightColor composition local use a Color type. (I0e05b)UrlAnnotation and its methods marked as experimental. (Ic0021)Bug Fixes
IndexOutOfBoundsException crash when using LinkAnnotation inside the BasicText or Text composable (be7605, b/374115892)-Xjspecify-annotations=strict (this is the default starting with version 2.1.0 of the Kotlin compiler). (Idfef8, b/326456246)AndroidView is detached and attached. (I53446)requestFocus() from beyond bound layout action. (Ia8461)External Contribution
BringIntoViewResponderModifierNode to UI, which provides a new way to implement Bring Into View functionality as well as allows implementing in on a platform level. (Ia6dd8)November 13, 2024
androidx.compose.ui:ui-*:1.8.0-alpha06 is released. Version 1.8.0-alpha06 contains these commits.
API Changes
stylusHoverIcon modifier. (Iff20a, b/331289114)requestFocus(FocusDirection) to both focusRequester and FocusTargetModifierNode to allow focusing with a specific direction. (I5d9ec, b/245755256)FocusProperties.enter and FocusProperties.exit have been replaced with onEnter and onExit, using a receiver scope instead of FocusDirection parameter. (I6e667)Modifier.focusRestorer() (I99c03):
FocusRequester and not a lambda@Experimental annotation from autofill manager interface. The feature is still WIP targeting this release but we do not want to introduce @Expemiental API (Id8398)LocalHapticFeedback now provides a default HapticFeedback implementation when the Vibrator API indicates that haptics are supported. The following have been added to the HapticFeedbackType - Confirm, ContextClick, GestureEnd, GestureThresholdActivate, Reject, SegmentFrequentTick, SegmentTick, ToggleOn, ToggleOff, VirtualKey. Wear Compose long-clickable components such as Button, IconButton, TextButton, and Card now perform the LONG_PRESS haptic when a long-click handler has been supplied. (I5083d)OverscrollConfiguration and LocalOverscrollConfiguration, and adds rememberPlatformOverscrollFactory to create an instance of / customize parameters of the default overscroll implementation. To disable overscroll, instead of LocalOverscrollConfiguration provides null, use LocalOverscrollFactory provides null. To change the glow color / padding, instead of LocalOverscrollConfiguration provides OverscrollConfiguration(myColor, myPadding), use LocalOverscrollFactory provides rememberPlatformOverscrollFactory(myColor, myPadding). (Ie71f9, b/255554340, b/234451516)GlobalAssertions API. It's intended use was to run accessibility checks, see enableAccessibilityChecks() for that purpose instead. (I59322)October 30, 2024
androidx.compose.ui:ui-*:1.8.0-alpha05 is released. Version 1.8.0-alpha05 contains these commits.
New Features
Autofill is exposed behind a feature flag in this release. We are working on improving performance, and are looking for early feedback on the APIs. The APIs are expected to evolve prior to stable based on feedback.
ComposeUiFlags.isSemanticAutofillEnabled to true in onCreate and use the latest Compose Snapshot.API Changes
expect/actual structure. (I22dce)CompositionLocal that can be used to modify the hue of Autofill's successful filling highlight. (I32092)Modifier.onRectChanged API which is an API that allows one to subscribe to the root/window/screen-relative position and size of a LayoutNode. The API solves many use cases that the existing onGloballyPositioned modifier does, however it does so with much less overhead and the API comes with facilities to debounce and throttle the callback per what one's use case demands. (Id28c7, b/372765423, b/372757007, b/372994338)commit() and cancel() APIs that help users save newly entered credentials. (I2da00)AutofillManager interface that can be used to fine-tune users' Autofill journey and a isSemanticAutofillEnabled flag to turn on this new version of Autofill. (I9d484)Modifier.onRectChanged API which is an API that allows one to subscribe to the root/window/screen-relative position and size of a LayoutNode. The API solves many use cases that the existing onGloballyPositioned modifier does, however it does so with much less overhead and the API comes with facilities to debounce and throttle the callback per what one's use case demands. (I3c8fa)AnnotatedString builder are non-experimental now (Ia89c8, b/261561823)Bug Fixes
TextField from functioning correctly when using the POBox Japanese Keyboard on certain older Sony devices. (Ia9b99, b/373743376)decorFitsSystemWindows set to false. (Ibc94, b/364492593)October 16, 2024
androidx.compose.ui:ui-*:1.8.0-alpha04 is released. Version 1.8.0-alpha04 contains these commits.
API Changes
DelegatableNode#onDensityChange and DelegatableNode#onLayoutDirectionChange callbacks to allow updating node state when these change (I04f3e, b/340662451)WindowInfo#containerSize to provide the current window's content container size. This can be retrieved using LocalWindowInfo. (Idc38c, b/369334429, b/360343819)onPostFling event with the remaining velocity. We're also introducing the flag NewNestedScrollFlingDispatchingEnabled to control the behavior in case of regressions. The flag will be removed before beta. (I05c37, b/371168883)PointerInputModifierNode#touchBoundsExpansion, which can be used to enlarge the touch bounds of a single pointer input modifier. (Iccf02, b/335339283)WindowInfo#containerSize to provide the current window's content container size. This can be retrieved using LocalWindowInfo. (I27767, b/369334429, b/360343819)readOnly from TextFields' to pin to stable foundation version. (I3aaba)Paragraph and ParagraphIntrinsics now takes a list of all annotations applied to the AnnotatedString, previously it only had a list of SpanStyles (I12f80)Bug Fixes
AnnotatedString. Before you could only create non-overlapping paragraphs. Now the AnnotatedString allows fully-overlapping paragraphs which will be merged together, and nested paragraphs in which case the outer paragraph will be split on bounds of the inner one, and the inner paragraph's style will be merged with the outer paragraph's style (Ic9554)AnnotatedString with a zero-length LinkAnnotation. (89aac6)October 2, 2024
androidx.compose.ui:ui-*:1.8.0-alpha03 is released. Version 1.8.0-alpha03 contains these commits.
API Changes
invisibleToUser() to hideFromAccessibility. Its function remains the same. See documentation for more details. (Ib43a3)Bug Fixes
SensitiveContent modifier (Ib0442)ComposeView. The clearFocus() behavior aligns with View behavior on API < 28, where clearFocus() can cause the default View to be focused.LazyList by separating the management of subcomposition for different layout passes.TextField to an EditText or any other View based editor. onPostFling events correctly after they get detached.September 18, 2024
androidx.compose.ui:ui-*:1.8.0-alpha02 is released. Version 1.8.0-alpha02 contains these commits.
API Changes
TextOverflow.StartEllipsis and TextOverflow.MiddleEllipsis are now available which allows to place ellipsis at the start or middle of the line of the single line text. (I38913, b/185418980)Bug Fixes
dismissOnClickoutside (39a3d, b/364508685)External Contribution
AlignmentLines Map now accepts VerticalAlignmentLine or HorizontalAlignmentLine concrete types. (I02912)ByteArray.decodeToImageBitmap(): ImageBitmap method. (I83c21)September 4, 2024
androidx.compose.ui:ui-*:1.8.0-alpha01 is released. Version 1.8.0-alpha01 contains these commits.
February 12, 2025
androidx.compose.ui:ui-*:1.7.8 is released. Version 1.7.8 contains these commits.
January 29, 2025
androidx.compose.ui:ui-*:1.7.7 is released. Version 1.7.7 contains these commits.
Bug Fixes
IndexOutOfBoundsException when passing an AnnotatedString with the LinkAnnotation to the Text composable. (Ic96d2)LinkAnnotation is used in the AnnotatedString. (I04a03)December 11, 2024
androidx.compose.ui:ui-*:1.7.6 is released. Version 1.7.6 contains these commits.
Bug Fixes
SemanticsPropertyReceiver.invisibleToUser(). This will be deprecated in 1.8 to be replaced with SemanticsPropertyReceiver.hideFromAccessibility(). (I448f0, b/376479686)TextField from functioning correctly when using the POBox Japanese Keyboard on certain older Sony devices. (I94e0e, b/373743376)BasicText’s inlineContent was not announced by TalkBack. (I67bcb, b/376479686)October 30, 2024
androidx.compose.ui:ui-*:1.7.5 is released. Version 1.7.5 contains these commits.
Bug Fixes
LinkAnnotation. (Ic1e2e)Talkback of the button when it's built as a clickable Text composable. (I1f588)October 16, 2024
androidx.compose.ui:ui-*:1.7.4 is released. Version 1.7.4 contains these commits.
October 2, 2024
androidx.compose.ui:ui-*:1.7.3 is released. Version 1.7.3 contains these commits.
Bug Fixes
ComposeView. The clearFocus() behavior aligns with View behavior on API < 28, where clearFocus() can cause the default View to be focused.placeOrder was used for lookahead invalidation, therefore fixing an edge case where lookahead placement was skipped. September 18, 2024
androidx.compose.ui:ui-*:1.7.2 is released. Version 1.7.2 contains these commits.
Bug Fixes
ComposeView will no longer crash when passed exceptionally large measurement size (da5db, b/347036173)LiveRegion announcements on buttons were not made. (f66fa7, b/348590026)September 10, 2024
-desktop artifacts were removed and -jvmStubs and -linuxx64Stubs artifacts were added. None of these targets are meant to be used, they are placeholders to help Jetbrains Compose efforts.September 4, 2024
androidx.compose.ui:ui-*:1.7.0 is released.
Important changes since 1.6.0
Important changes in version 1.7.0 are covered in this blogpost.
August 21, 2024
androidx.compose.ui:ui-*:1.7.0-rc01 is released. Version 1.7.0-rc01 contains these commits.
Notable changes
NestedScrollSource changes that happened early during 1.7.0-alpha01.August 7, 2024
androidx.compose.ui:ui-*:1.7.0-beta07 is released. Version 1.7.0-beta07 contains these commits.
Bug Fixes
SemanticsNodeInteraction functions performTextReplacement, performTextInput, and performTextClearance is now going to throw assertion errors when they are called on read only TextFields. (I4ae8f)July 24, 2024
androidx.compose.ui:ui-*:1.7.0-beta06 is released. Version 1.7.0-beta06 contains these commits.
July 10, 2024
androidx.compose.ui:ui-*:1.7.0-beta05 is released. Version 1.7.0-beta05 contains these commits.
Bug Fixes
TextField to not accept input from the new keyboard until the focus is lost and regained. SurfaceView content.June 26, 2024
androidx.compose.ui:ui-*:1.7.0-beta04 is released. Version 1.7.0-beta04 contains these commits.
Bug Fixes
GraphicsLayer API. (35ddd8)June 12, 2024
androidx.compose.ui:ui-*:1.7.0-beta03 is released. Version 1.7.0-beta03 contains these commits.
May 29, 2024
androidx.compose.ui:ui-*:1.7.0-beta02 is released. Version 1.7.0-beta02 contains these commits.
API Changes
SemanticsProperties.Editable to IsEditable and changes SemanticsPropertyReceiver.editable to a val isEditable. The property is now a boolean and always specified by text fields. (I8acd8)TextLinkStyles is now part of the LinkAnnotation constructor and the AnnotatedString.fromHtml method (I90b2b). Also removed the TextDefaults from material (I5477b)Bug Fixes
LayoutCoordinates.introducesFrameOfReference to LayoutCoordinates.introducesMotionFrameOfReference to better reflect its purpose. Renamed related function to calculate coordinates based on that flag. (I3a330)May 14, 2024
androidx.compose.ui:ui-*:1.7.0-beta01 is released. Version 1.7.0-beta01 contains these commits.
API Changes
performCustomAccessibilityActionLabelled to performCustomAccessibilityActionWithLabel and performCustomAccessibilityActionWhere to performCustomAccessibilityActionWithLabelMatching. (I5387f)AnnotatedString.hasEqualsAnnotations is now hasEqualAnnotations (I685c0)TextDefaults for constructing themed LinkAnnotations and parse HTML with themed links. Instead, added a TextLinkStyles class that allows to style the links as a parameter to the Text composable. (I31b93)Bug Fixes
May 1, 2024
androidx.compose.ui:ui-*:1.7.0-alpha08 is released. Version 1.7.0-alpha08 contains these commits.
API Changes
Shape#createOutline is now observed inside graphics layers, so reading state values inside will cause invalidations when the state changes, allowing for more performant shape animations. (Id1629, b/326070216)isPositionedByParentWithDirectManipulation to introducesFrameOfReference. Note that it now has the reverse effect, meaning that by default, most LayoutCoordinates introduce a frame of reference, and, only when placed under direct manipulation the property will be false. To query position with only those that introduce a frame of reference, use positionInLocalFrameOfReference(...). Or positionInLocalLookaheadFrameOfReference from a LookaheadScope. (Ifc5f7)LookaheadScope APIs have been made stable (I21507)getScrollViewportLength as per API council feedback. (Ibc74a)GraphicsLayer outline APIs to consume float parameters instead of int. Removed UnsetOffset/UnsetSize IntSize sentinel values in favor of already existing Unspecified constants on float based Offset and Size inline classes (I2fb03, b/333863462)MouseInjectionScope.click(), MouseInjectionScope.doubleClick(), MouseInjectionScope.tripleClick(), MouseInjectionScope.longClick() now accept a button: MouseButton parameter to make them more universally applicable. The default value is MouseButton.Primary for all methods. (I31a23, b/190493367, b/261439695)onClicked to onClick inside LinkInteractionListener. (Iaa35c)TextInclusionStrategy.isInside to isIncluded. Make Paragraph/MultiParagraph#getRangeForRect() return type non nullable. (I51f26)Bug Fixes
reverseScrolling=true. (I7c59c)External Contribution
LazyLists (e.g. a LazyColumn that renders nested LazyRows). This change is expected to reduce frame drops during scrolling for these LazyLists. The implementation default is to prefetch the first 2 nested items, however this behavior can be controlled by the new LazyLayoutPrefetchStrategy(nestedPrefetchItemCount) and LazyListPrefetchStrategy#onNestedPrefetch APIs. (I51952)April 17, 2024
androidx.compose.ui:ui-*:1.7.0-alpha07 is released. Version 1.7.0-alpha07 contains these commits.
API Changes
ClickableText is marked as deprecated. To add links to the text, create an AnnotatedString with a LinkAnnotation corresponding to your link and pass this AnnotatedString to the Text composable. (I34d4b, b/323346994)ViewConfiguration.HandwritingGestureLineMargin for handwriting gestures. Support JoinOrSplit gesture for BasicTextField (Ie6e13, b/325660505)FocusProperties.enter and FocusProperties.exit are no longer experimental. FocusDirection.Enter and FocusDirection.Exit are no longer experimental. FocusRequester.Cancel is no longer experimental (I461a1, b/261564106)excludeDirectManipulationOffset argument to exclude the offset set by parent Layouts that placed their children using Placeable.PlacementScope.withDirectManipulationPlacement. Likewise, a Layout that changes the position of its children frequently may now place them using withDirectManipulationPlacement (such as Scroll, implemented by default). This helps approachLayout based animations to be more intuitive, having now the opportunity to differentiate what offset to animate, and what to apply directly when deciding to animate their approach. (I60ec7)LazyColumn will now render sticky headers correctly in long screenshots. (I8d239, b/329296635)NestedScroll sources Drag and Fling are being replaced by UserInput and SideEffect to accommodate for the extended definition of these sources that now include animations (Side Effect) and Mouse Wheel and Keyboard (UserInput). (I40579)ApproachLayoutModifierNode and Modifier.approachLayout are now stable, with new isMeasurementApproachInProgress() and isPlacementApproachInProgress() to replace the old isMeasurementApproachComplete() and isPlacementApproachComplete() respectively.intermediateLayout modifier. (I3e91c)GraphicsLayer#buildLayer to record to mirror the begin/endRecording methods of Displaylist backed APIs like RenderNode and Picture.rememberGraphicsLayer to leverage rememberObserver. (I312c1, b/288494724, b/330758155)UrlAnnotation is deprecated, use LinkAnnotation.Url instead. If you're using Material theming, then use TextDefaults object to create the annotation with Material theming applied to it (I8d180, b/323346545)String.parseAsHtml renamed to AnnotatedString.Companion.fromHtml. (I43dcd)linkStyle, focusedLinkStyle, hoveredLinkStyle) and a link interaction listener to the parseAsHtml method. When parsing the HTML-tagged string with <a> tags, the method will construct a LinkAnnotation.Url for each such tag and pass the styling objects and link interaction listener to each annotation. (I7c977)LinkAnnotation now takes the state-based styling arguments and a LinkInteractionListener. Add this annotation to the AnnotatedString to get a hyperlink. By passing focusedState and/or hoveredState you can define the visual configuration for links when they are focused and/or hovered. (I81ce4, b/139312671)ImeOptions.hintLocales is no longer nullable. If you want to pass an empty Locale list, please use LocaleList.Empty. (Ic5bc4)Bug Fixes
April 3, 2024
androidx.compose.ui:ui-*:1.7.0-alpha06 is released. Version 1.7.0-alpha06 contains these commits.
New Features
parseAsHtml method for styled strings: it allows to convert a string marked with HTML tags into AnnotatedString. Note that not all tags are supported, for example you won't be able to display bullet lists yet. (I84d3d, I30626, b/139326648)ScrollCaptureCallback). This feature is experimental and may not currently handle all cases correctly. For that reason it is currently disabled by default. To opt-in, set the ComposeFeatureFlag_LongScreenshotsEnabled flag to true. (I2b055, b/329296471)API Changes
fun ClipEntry.getMetadata() is changed to val ClipEntry.clipMetadata. (I50155)ClipboardManager.getClipMetadata and ClipboardManager.hasClip functions. Please use clipEntry.getMetadata() to read the current clip entry's metadata. Also check ClipboardManager.getClip's result if it's null or not to understand whether Clipboard has a current clip. (I50498)GraphicsLayer objects into placeable.placeWithLayer() functions (I1b22f)ClipboardManager.setClip now accepts null to be able to clear the Clipboard. (I7d2e9)GraphicsLayer#toImageBitmap suspend method to support rendering contents of a bitmap into a GraphicsLayer. This is a hardware accelerated rendering operation on API level 22+ (inclusive) which supports over 99% of all Android devices. On Android API level 21 this falls back onto software rendering. (I9e114)RectF to ComposeRect (I39925, b/325660505)KeyboardOptions parameters now have an unspecified value by default. Added KeyboardOptions.merge method.KeyboardOptions.autoCorrect to autoCorrectEnabled and made it nullable, where null indicates no value was specified. (Ia8ba0, b/295951492)BasicTextField(state) variant and BasicSecureTextField now use KeyboardActionHandler instead of KeyboardActions to process actions taken by the software keyboard. (I58dda)March 20, 2024
androidx.compose.ui:ui-*:1.7.0-alpha05 is released. Version 1.7.0-alpha05 contains these commits.
New Features
GraphicsLayer API to record drawing commands in a display list as well as additional properties that affect the rendering of the display list. This provides an isolation boundary to divide a complex scene into smaller pieces that can be updated individually of one another without recreating the entire scene. Transformations made to a GraphicsLayer can be done without re-recording the display list. Unlike Modifier.graphicsLayer, GraphicsLayer allows for rendering of Composable content elsewhere and is useful in animated use cases where content is expected to be rendered in different scenes.API Changes
GraphicsLayer.draw(Canvas) is not a public api anymore. Please use the DrawScope.drawLayer(GraphicsLayer) extension function instead to draw the layer. (I7a7c0)restrictedConstraints() to two methods: fitPrioritizingWidth() and fitPrioritizingHeight() (I6d7fd)HardwareCanvas stub for Android L usage (I1c3b5, b/288494724)GraphicsContext composition local alongside updating Owner, DelegateableNode and drawWithCache Modifier implementations to expose access to the GraphicsContext for scoped access that will automatically cleanup GraphicsLayer instances when Modifiers are torn down. (I64a2f, b/288494724)InterceptPlatformTextInput for helping write low-level IME-related tests and other low-level IME use cases. PlatformTextInputTestOverride has been deprecated. (I862ed, b/322680547)GraphicsLayer.setOutline(Outline) extension function was added. (Ib81f4)GraphicsContext function constructor to create a factory to create GraphicsLayer instances (Ib98d6, b/288494724)GraphicsLayer API to provide developer defined flexibility in capturing drawing commands that can be used to draw elsewhere and also apply different visual effects to the end result. (I80245, b/288494724)Paragraph#getRangeForRect which returns a range of text covered by a given rectangle area. (Iee516, b/325660505)BasicText with onLinkClicked argument. A replacement API for hyperlinks support will follow in the future. (I107d5)Bug Fixes
GraphicsLayer expect/actual API definition to support capturing and replaying of drawing commands with optional compositing visual effects and transforms. Introduce GraphicsContext interface to contain graphics dependencies including creation and management of GraphicsLayer instances. (I4a8d6, b/288494724)ComposeView that was embedded among other views. (I08fd4)External Contribution
LocalLifecycleOwner moved from Compose UI to lifecycle-runtime-compose so that its Compose-based helper APIs can be used outside of Compose UI. Thanks Jake Wharton for the contribution. (I6c41b, b/328263448)March 6, 2024
androidx.compose.ui:ui-*:1.7.0-alpha04 is released. Version 1.7.0-alpha04 contains these commits.
API Changes
GetScrollViewportLength semantic action so we can pipe up information about the components being scrolled in compose to the a11y system. This CL also applies the usage of said property in Foundation Scrollable Lists. (Ic5fa2)FocusRequester.createRefs is now stable (I4d92c, b/261436820)DelegatableNode.requireView() to allow modifier nodes to get the current Android View without reading a composition local. (I40768)Path.reverse() to reverse a path's direction (I36348)hintLocales to KeyboardOptions to provide TextFields with the ability to hint IMEs with specific locales to preset a preferred language.platformLocale property from Locale that returns the underlying platform object, e.g. java.util.Locale. (I921c6)February 21, 2024
androidx.compose.ui:ui-*:1.7.0-alpha03 is released. Version 1.7.0-alpha03 contains these commits.
API Changes
ContextualFlowRow and Enhanced FlowRow/Column with MaxLines and Overflow. We are excited to announce enhancements to the experimental FlowRow and FlowColumn, now featuring maxLines and overflow support, alongside the debut of ContextualFlowRow and ContextualFlowColumn. This update is designed to provide performance optimal components, where ContextualFlow* is perfect for a large number of items making use of a small maxLines config and dynamic +N see more buttons, and FlowRow and FlowColumn is perfect for a small number of items, less than 100 items. Important: To maintain existing behavior in FlowRow or FlowColumn where all items are composed regardless of if they fit the cross axis max, set overflow to FlowRowOverflow.Visible or FlowColumnOverflow.Visible during initialization. Explore ContextualFlowRowSample and FlowRowSample for examples of these new features in action. (Ib9135, b/293577082)maxTextLength semantics property that should be set on text fields that filter the maximum allowed number of characters. (I24d9f, b/170648072)Modifier.inspectable wrapper has been deprecated. This API will create more invalidations of your modifier than necessary, so its use is now discouraged. Developers are encouraged to implement the inspectableProperties() method on ModifierNodeElement if they would like to expose modifier properties to tooling. (Ib3236)PopupProperties which allows for full control over WindowManager.LayoutParams flags. (Ibb33e, b/312485503)DelegatableNode.requireLayoutCoordinates() as a way to get a Modifier.Node's current LayoutCoordinates without needing to override onPlaced and store the coordinates in a property yourself. (Ia8657)DelegatableNode.currentLayoutCoordinates as a way to get a Modifier.Node's current LayoutCoordinates without needing to override onPlaced and store the coordinates in a property yourself. (Iaebaa)BasicTextField2 and related APIs under androidx.compose.foundation.text2 package are moved to androidx.compose.foundation.text. (I9f635)ApproachLayoutModifierNode API to support creating custom approach logic in an explicit Modifier Node. Also added a new experimental DeferredTargetAnimation API for animations whose target is unknown at instantiation. (I60745)Path APIs to query the direction of a Path and to extract contours from a Path. (I63d04)PathHitTest and Path.contains(Offset) to check if a Path contains a specific point. (I3b218)TextLayoutResult now exposes the getLineBaseline(lineIndex) method. This allows to read the baseline of an arbitrary line of the text in addition to existing convenience properties firstBaseline and lastBaseline. (Ide4e8, b/237428541)AnnotatedStrings. (I32659)Bug Fixes
SemanticsPropertyReceiver.performImeAction and SemanticsActions.PerformImeAction. (Id0528, b/322269946)February 7, 2024
androidx.compose.ui:ui-*:1.7.0-alpha02 is released. Version 1.7.0-alpha02 contains these commits.
API Changes
SemanticsPropertyReceiver.performImeAction. (I65865, b/322269946)PopupProperties constructor that takes a usePlatformDefaultWidth parameter is no longer experimental. (I8f8d2)ComposeTestRule.waitUntil that takes a string description of the condition to include in the timeout message. (I9413e)unset() to remove semantics properties that are added in the same modifier chain. New semantics property isOpaque. (I8c583, b/317966058, b/246056649)originalEventPosition from copy method in public API of PointerInputChange. (I7bead)Bug Fixes
VelocityTracker will now have the fix for adding points on by default. The fix can still be turned off by setting VelocityTrackerAddPointsFix to false if there's any issues. (Ib3877, b/269487059)TextStyle and ParagraphStyle. (I179f0, b/320819734)External Contribution
DialogProperties constructor without platform-specific parameters. (I45829)PopupProperties constructor without platform-specific parameters. (I9a038)January 24, 2024
androidx.compose.ui:ui-*:1.7.0-alpha01 is released. Version 1.7.0-alpha01 contains these commits.
API Changes
ClipboardManager by adding ClipEntry and ClipMetadata to support arbitrary content such as images.DeviceConfigurationOverride API to ui-test to allow locally
overriding the behavior of content under test, such as to specify an available
size, locale, layout direction, font scale, or theme.June 12, 2024
androidx.compose.ui:ui-*:1.6.8 is released. Version 1.6.8 contains these commits.
Bug Fixes
May 1, 2024
androidx.compose.ui:ui-*:1.6.7 is released. Version 1.6.7 contains these commits.
April 17, 2024
androidx.compose.ui:ui-*:1.6.6 is released. Version 1.6.6 contains these commits.
Bug Fixes
BasicTextField crash.April 3, 2024
androidx.compose.ui:ui-*:1.6.5 is released. Version 1.6.5 contains these commits.
March 20, 2024
androidx.compose.ui:ui-*:1.6.4 is released. Version 1.6.4 contains these commits.
March 6, 2024
androidx.compose.ui:ui-*:1.6.3 is released. Version 1.6.3 contains these commits.
February 21, 2024
androidx.compose.ui:ui-*:1.6.2 is released. Version 1.6.2 contains these commits.
February 7, 2024
androidx.compose.ui:ui-*:1.6.1 is released. Version 1.6.1 contains these commits.
Bug Fixes
SemanticsPropertyReceiver.performImeAction and SemanticsActions.PerformImeAction. (Ie0bb2, b/322269946)Constraints.Infinity. The check will help developers find problems with the layout having the wrong size rather than in a layout that contains it. (I339a9)January 24, 2024
androidx.compose.ui:ui-*:1.6.0 is released. Version 1.6.0 contains these commits.
January 10, 2024
androidx.compose.ui:ui-*:1.6.0-rc01 is released. Version 1.6.0-rc01 contains these commits.
Bug Fixes
December 13, 2023
androidx.compose.ui:ui-*:1.6.0-beta03 is released. Version 1.6.0-beta03 contains these commits.
New Features
LayoutCoordinates to be detached without the node being detached. Guard against that in the compose Layout Inspector (If693)Bug Fixes
PlatformImeOptions is now a concrete class instead of an interface. (If40a4)LocalSoftwareKeyboardController and LocalTextInputService being provided new values every time a root recomposed. (I42190, b/310510985)November 29, 2023
androidx.compose.ui:ui-*:1.6.0-beta02 is released. Version 1.6.0-beta02 contains these commits.
November 15, 2023
androidx.compose.ui:ui-*:1.6.0-beta01 is released. Version 1.6.0-beta01 contains these commits.
API Changes
DragAndDropTarget modifier now takes in the receiving DragAndDropTarget explicitly and has a lambda to opt into a drag and drop session. There are now two factory functions for a DragAndDropModifierNode. One for receiving transfers and one for transferring data (I69481)maximumFlingVelocity to be represented as Float. Updated documentation to be more clear about the maximumFlingVelocity unity. (I8adc7)onDragAndDropStart in the DragAndDropModifierNode factory has been renamed to acceptDragAndDropTransfer.acceptsDragAndDropTransfer has been added to the dragAndDropTarget Modifier to accept from a drag and drop session. This lambda returns a viable DragAndDropTarget if interested in a drag and drop session. Other lambdas for processing drag events have been replaced by this. a DragAndDropTarget factory function has been added to receive from drag and drop sessions (Iebf3a)Removed DragAndDropInfo as a type DragAndDropModifierNode.drag now takes parameters for the transferData, decoration size and drag decoration DrawScope lambda
DragAndDropTarget has methods for particular drag and drop events instead of being a single abstract method
onDragAndDropEvent in the factory function for a DragAndDropModifierNode has been renamed to onDragAndDropStart to better communicate that the DragAndDropTarget provided is valid for a given drag and drop session only
The DragAndDropEventType has been removed (I645b1)
Renamed PlatformTextInputModifierNode.runTextInputSession to establishTextInputSession. (I03cd0)
Improves traversable node api names to make them more understandable. (Ia4474)
Replace OriginalText by TextSubstitution. (Ifa5a8)
Renamed PlatformTextInputModifierNode.textInputSession to runTextInputSession. (Ie9c6b)
The children of SubcomposeLayout (and layouts like LazyColumn based on it) which are retained to be reused in future are considered deactivated. New assertIsDeactivated() test API was introduced to test such nodes. The rests of the test apis will filter out deactivated nodes by default. (I2ef84, b/187188981)
Removed FocusDirection.In and FocusDirection.Out use FocusDirection.Enter and FocusDirection.Exit instead (I2f660)
Material SwipeToReveal APIs (for Cards and Chips) now rely on a slot based API (as recommended by Compose) instead of data class based instances to create those slots. This is a breaking change, please see the demo and sample code for examples on how to use the new API. (Ia8943)
FontStyle(int) constructor is deprecated, use FontStyle.Normal or FontStyle.Italic instead. (I66610)
Renamed FontScalable interface to FontScaling (Ie804a)
Bug Fixes
SoftwareKeyboardController.show() will no longer show the software keyboard if no text editor is focused. (I2165a, b/301477279)ArcLine. (I4d5bb)PageSize.Fixed. (Ie3ede, b/300134276)TestDispatchers passed as the effectContext to Compose tests will now be used to create the test and frame clocks. (Ia7178)October 18, 2023
androidx.compose.ui:ui-*:1.6.0-alpha08 is released. Version 1.6.0-alpha08 contains these commits.
API Changes
Modifier.dragAndDrawSource has had the onDrawDragShadow lambda renamed to drawDragDecoration and DragAndDropInfo has had the size parameter renamed to dragDecorationSize. (Id0e30, b/303904810)SemanticsNodeInteraction.isDisplayed() and SemanticsNodeInteraction.isNotDisplayed() to check if a matched node is visible or not without also asserting on it. (I2c196, b/302100809)Unspecified value for TextAlign, TextDirection, Hyphens and LineBreak fields of the ParagraphTextStyle to replace null. Because these classes are inline classes, by replacing nullable with the Unspecified, we avoid primitive type boxing. Constructors, getters and other methods in TextStyle and Paragraph style were updated to accept the mentioned parameters as non-null types. (I4197e, b/299490814)GoogleFont overload for reading a GoogleFont from XML. (If8f59)LoremIpsum PreviewParameterProvider an open class. (I41bf5, b/266918816, b/300116360)Bug Fixes
FontFamilyResolver now uses Dispatchers.Main for cache management coroutines. (Ie8dd9)AndroidViewBinding now synchronously removes Fragment instances inflated by including a FragmentContainerView in your layout as part of its onRelease by using commitNow (instead of the commit it was using previously), thus fixing issues with Live Edit's method with replacing the composition upon changes. (I58fbf)October 4, 2023
androidx.compose.ui:ui-*:1.6.0-alpha07 is released. Version 1.6.0-alpha07 contains these commits.
API Changes
PlatformTextInputMethodTestOverride for writing tests for custom text editors. (Id159b)dragAndDropSource Modifier for starting drag and drop sessions, and dragAndDropTarget Modifier for receiving from drag and drop sessions. (Ib7828, b/286038936)ColorList and ColorSet collections that avoid allocations. (I744bd)DisableNonLinearFontScalingInCompose temporary flag to disable non-linear font scaling. Set DisableNonLinearFontScalingInCompose = true in your tests if you need time to clean them up. This flag will be removed in Compose 1.6.0-beta01. (Ic9486)Bug Fixes
September 20, 2023
androidx.compose.ui:ui-*:1.6.0-alpha06 is released. Version 1.6.0-alpha06 contains these commits.
API Changes
onRestoreFailed() callback to the focusRestorer() modifier (Ie1d43)ColorInt, FloatRange, IntRange, Size and more. (Id65c8, b/290950582)showSystemUi=true to PreviewScreenSizes definition (Ib61d3)Behavior Changes
September 6, 2023
androidx.compose.ui:ui-*:1.6.0-alpha05 is released. Version 1.6.0-alpha05 contains these commits.
API Changes
AndroidComposeViewAccessibilityDelegateCompat. (Ib2969)ScrollView and RecyclerView are capped at ViewConfiguration.ScaledMaximumFlingVelocity. Compose now contains its own version of maximumFlingVelocity which now applies to Draggable. (Ibf974)deviceId into RotaryScrollEvent (Iba3bf)ui-tooling Devices API to include newer devices (Ib25b4)August 23, 2023
androidx.compose.ui:ui-*:1.6.0-alpha04 is released. Version 1.6.0-alpha04 contains these commits.
API Changes
ReusableComposition, removing observations but keeping nodes in place. The deactivated composition can be activated again by calling setContent. (Ib7f31)ReusableComposition interface for managing lifecycle and reuse of subcompositions. (I812d1, b/252846775)Modifier.focusGroup has been promoted to stable APIs. (I7ffa3)ColorInt, FloatRange, IntRange, Size and more. (I70487, b/290950582)ColorFilter API to have concrete subclass types for improved inspectability of parameters. (I5fe29)FontScalable interface to handle the font scaling part of the Density interface. (I2cf3f)August 9, 2023
androidx.compose.ui:ui-*:1.6.0-alpha03 is released. Version 1.6.0-alpha03 contains these commits.
API Changes
LookaheadScope Composable fun and interface are now stable. (Ifb2ce)privateImeOptions (Idb772)Bug Fixes
PopupPositionProvider.calculatePosition will now automatically update the popup's position when state read in the calculation is changed. (I676a1, b/292257547)readOnly is true. Also fixed the keyboard not showing when readOnly is changed from true to false while focused. (I34a19, b/246909589)July 26, 2023
androidx.compose.ui:ui-*:1.6.0-alpha02 is released. Version 1.6.0-alpha02 contains these commits.
API Changes
PlatformTextInput* API. (I6c93a, b/274661182, b/267235947, b/277380808)SoftwareKeyboardController and LocalSoftwareKeyboardController are no longer experimental. LocalSoftwareKeyboardController is also now a proper CompositionLocal. (I4c364)LookaheadLayout and LookaheadLayoutScope have been deprecated for a few releases and are now removed. The replacement APIs are LookaheadScope that can work with any Layout. (I12ac3)SemanticsNodeInteraction.requestFocus as a more convenient and discoverable way to request focus in tests. (Ie8722)Bug Fixes
AndroidView's update callback's first invocation will now be defered until the view is attached, instead of running when the composition that introduces the AndroidView is applied. This fixes a bug where the update callback wouldn't be invalidated if a state it read was changed immediately by an effect. (Ie9438, b/291094055)June 21, 2023
androidx.compose.ui:ui-*:1.6.0-alpha01 is released. Version 1.6.0-alpha01 contains these commits.
New Features
LazyList. This allows LazyList in the lookahead pass to bypass any animation (e.g. item placement animation, AnimatedVisibility, etc) and to calculate the lookahead size and position for all children. After the lookahead pass, children of LazyList could animate independently to the reality as seen in the lookahead pass.Behavior Change: includeFontPadding is now false by default in Compose
includeFontPadding is now false by default (21d806) in Compose.
includeFontPadding is a legacy attribute that controls whether or not to include extra padding on top of the first line and last line of the text to accommodate any characters that may extend above or below the text baselines.
Updating this Compose version will modify how all texts render in your UI by removing the extra padding on top of the first line and last line of every text you display.
Depending on your UI requirements and the font metrics you’re using, the changes should be minimal. However you might encounter blockers such as: - Broken screenshot tests. Fix the UI if required, and regenerate the golden images. - Text is slightly misaligned. Remove any custom negative paddings or add padding if required.
You can opt-in to includeFontPadding by using PlatformTextStyle for each text:
Text(
text = myText,
style = TextStyle(
lineHeight = 2.5.em,
platformStyle = PlatformTextStyle(
includeFontPadding = true/false
)
/* … */
)
)
You can opt-in to includeFontPadding for all your texts by configuring your Material styles. Note that parameter names will vary between M2 and M3.
val Typography = Typography(
body1 = TextStyle(
fontFamily = /* … */,
fontSize = /* … */,
platformStyle = PlatformTextStyle(
includeFontPadding = false
)
/* … */
)
)
MaterialTheme(
typography = Typography,
/* … */
)
You can find more about Compose includeFontPadding in developer documentation and this blog post.
If you experience issues/bugs connected with this change, file a bug using the issue tracker.
API Changes
InputConnection#requestCursorUpdates (I0c69b)FocusRequester.saveFocusedChild and FocusRequester.restoreFocusedChild (Ic557e, b/272302679, b/275157318)ResourceResolutionException type to wrap throwables thrown when attempting to load bitmap assets with a description of the asset path that failed to load. (I19f44, b/230166331, b/278424788)IntrinsincMeasureScope and its implementations (e.g. MeasureScope) to indicate whether the current measure pass is a lookahead pass. (I7a812)DrawScope api to introduce the ability to retarget rendering into a different canvas with alternative density/layoutdirection and size.DrawContext to support configuration of density and layout direction as well as making the canvas configurable. (Ie1f9b, b/225408150)Paragraph#fillBoundingBoxes to calculate character bounding boxes. (If30ee)MultiPreviews (Ia5a27)Bug Fixes
FocusTargetModifierNode interface that can be used to create a custom FocusTarget. (I9790e)fallback* parameters on the TextMeasurer constructor to default*. (I940a5)SemanticsPropertyReceiver.performImeAction to onImeAction and SemanticsActions.PerformImeAction to OnImeAction. (I8e841)NestedScrollConnection). (Ie57e4)asComposePaint API to replace toComposePaint as the returned object wraps the original android.graphics.Paint (I22b4c)SemanticsProperties.imeAction and replace with a new parameter to SemanticsActions.performImeAction. (I4a587)Paragraph methods that used to throw AssertionError for out of bounds offsets now throw IllegalArgumentException as MultiParagraph does. (I549d3, b/243338896)October 18, 2023
androidx.compose.ui:ui-*:1.5.4 is released. Version 1.5.4 contains these commits.
October 4, 2023
androidx.compose.ui:ui-*:1.5.3 is released. Version 1.5.3 contains these commits.
Bug Fixes
TextField would sometimes incorrectly apply previous commands when focusing and inputting Korean input, leading to lost characters.September 27, 2023
androidx.compose.ui:ui-*:1.5.2 is released. Version 1.5.2 contains these commits.
Bug Fixes
September 6, 2023
androidx.compose.ui:ui-*:1.5.1 is released. Version 1.5.1 contains these commits.
Bug Fixes
readOnly is true. Also fixed the keyboard not showing when readOnly is changed from true to false while focused. (I34a19, b/246909589)August 9, 2023
androidx.compose.ui:ui-*:1.5.0 is released. Version 1.5.0 contains these commits.
July 26, 2023
androidx.compose.ui:ui-*:1.5.0-rc01 is released. Version 1.5.0-rc01 contains these commits.
Bug Fixes
SubcomposeLayout is used inside movableContentOf().June 28, 2023
androidx.compose.ui:ui-*:1.5.0-beta03 is released. Version 1.5.0-beta03 contains these commits.
Bug Fixes
usePlatformDefaultWidth=true. (I112ee)June 7, 2023
androidx.compose.ui:ui-*:1.5.0-beta02 is released. Version 1.5.0-beta02 contains these commits.
API Changes
asComposePaint API to enable consumption of an android.graphics.Paint instance to be used in ComposeBug Fixes
asComposePaint API to replace toComposePaint as the returned object wraps the original android.graphics.Paint (I22b4c)May 24, 2023
androidx.compose.ui:ui-*:1.5.0-beta01 is released. Version 1.5.0-beta01 contains these commits.
API Changes
AndroidComposeView (Ib2bfa)CacheDrawModifierNode() to allow delegation (Icf8f9)isLookingAhead property, accessible from MeasureScope, to observe lookahead results and influence main pass if desired. (Ibf4c3)traversalIndex, a float used to reorder nodes in TalkBack traversal (lower values come before). (I9a81b, b/186443263)isContainer to isTraversalGroup (I121f6)ColorProducer now has an operator fun invoke instead of produce (I4a9a2)Path transform API to apply translation/scale/rotation transformations to path objects. (I23434, b/233772232)ColorProducer's method is called produce. (I78bde)toFrameworkColorSpace to toAndroidColorSpace (I4f547)ColorLambda to ColorProducer. (I73b1a)BasicText to allow efficiently animating or setting text color. (Iffd88, b/246961787)TextRange.constrain to TextRange.coerceIn. (I31be2)TextStyle.merge(...) with full parameter list. (Iad234, b/246961787)Brush, DrawStyle, TextMotion, DrawScope.drawText, Paragraph.paint(Brush), MultiParagraph.paint(Brush). (I2f740, b/261581564, b/261581931, b/261561245)PlatformTextStyle.includeFontPadding is undeprecated. Our original intent was to remove the field, however the feedback shows that developers need this configuration option. Therefore removing deprecation from the field (I98e96, b/277703184)TextRange.constrain method. (I97912)UrlAnnotations in AnnotatedStrings can now be opened via accessibility services like TalkBack. (If4d82, b/253292081)InsertTextAtCursor semantics action for text fields. (I11ed5)LineHeightStyle.Alignment(topRatio) constructor is promoted to stable API. (I79c32, b/261565383)TextMeasurer and related APIs are no longer experimental. (I74647, b/261581753)PerformImeAction semantics action to invoke the IME action on text editor nodes. (Ic606f, b/269633506)PlatformTextInput APIs are no longer experimental for Android. (I668eb)Enum.valueOf changed (Ia9b89)PlatformTextInputAdapter API for building custom text input implementations that talk directly to platform APIs. (I58df4)BlendMode parameter to DrawScope.drawText, Paragraph.paint, and MultiParagraph.paint methods to support different blending algorithms when drawing text on Canvas. (I57508)Font.MaximumAsyncTimeout to Font.MaximumAsyncTimeoutMillis. Rename only. (I07af5)@Preview reference devices (Id6151, b/254528382)brush, alpha parameters to BasicText to allow efficiently animating or setting text brush.Bug Fixes
AndroidFont.fontVariationSettings (I7d9e2)External Contribution
May 10, 2023
androidx.compose.ui:ui-*:1.5.0-alpha04 is released. Version 1.5.0-alpha04 contains these commits.
New Features
Modifier.Node Delegation Improvements
Added an enhanced ability to delegate to other Modifier.Node instances from a DelegatingNode. This can be done with the delegate and undelegate APIs. Prior to this change, every API from the delegating node needed to be delegated explicitly to the delegated node. After this change, node interfaces will get delegated implicitly unless the DelegatingNode is explicitly overriding them. (67352bc)API Changes
NestedScrollModifierNode, a NestedScroll Modifier.Node that can be delegated to. (I69513)onReset and onRelease parameters to the AndroidViewBinding composable, mirroring the AndroidView composable and enabling support for View reuse with ViewBinding. (I00b1e, b/276802519)TextStyle.merge(...) with full parameter list. (Iad234, b/246961787)Brush, DrawStyle, TextMotion, DrawScope.drawText, Paragraph.paint(Brush), MultiParagraph.paint(Brush). (I2f740, b/261581564, b/261581931, b/261561245)PlatformTextStyle.includeFontPadding is undeprecated. Our original intent was to remove the field, however the feedback shows that developers need this configuration option. Therefore removing deprecation from the field (I98e96, b/277703184)Bug Fixes
Dialog composable. (I82551, b/262140644)April 19, 2023
androidx.compose.ui:ui-*:1.5.0-alpha03 is released. Version 1.5.0-alpha03 contains these commits.
New Features
SubcomposeLayout in LookaheadScope: SubcomposeLayouts that don’t have conditional slots (e.g. TabRow, Scaffold, BoxWithConstraints, etc) now work nicely with lookahead animations.API Changes
intermediateMeasurePolicy that reuses measure policy from lookahead pass allows SubcomposeLayout subtypes without conditional slots such as Scaffold, TabRow, and BoxWithConstraints to work with lookahead by default. (Id84c8)withFrameNanos instead of all composition when it receives an ON_STOP notification. This means windows associated with stopped activites will continue to recompose for data changes but the animations, or any other caller of withFrameNanos, will block. (Id9e7f, b/240975572)motionEventSpy to stable. (Ic5ec4, b/261560988)TextRange.constrain method. (I97912)PlatformTextStyle.includeFontPadding is no longer deprecated to encourage developers to use this compatibility API to switch and test setting includeFontPadding false. (I98e96, b/277703184)April 5, 2023
androidx.compose.ui:ui-*:1.5.0-alpha02 is released. Version 1.5.0-alpha02 contains these commits.
API Changes
SubcomposeLayout API that takes an additional intermediate measure policy for handling measure/layout logic during lookahead-based animations. (I017d3)PointerInputChange. (I1b543, b/261560988, b/261565762, b/261565749)SuspendingPointerInputModifierNode for more complex Modifier.Node implementations. (Ic4933)UrlAnnotations in AnnotatedStrings can now be opened via accessibility services like TalkBack. (If4d82, b/253292081)InsertTextAtCursor semantics action for text fields. (I11ed5)performTextInput) will now request focus directly, using the semantics action, instead of clicking on the field. (I6ed05)Bug Fixes
March 22, 2023
androidx.compose.ui:ui-*:1.5.0-alpha01 is released. Version 1.5.0-alpha01 contains these commits.
API Changes
Modifier.Node#coroutineScope to allow Modifier.Nodes to launch coroutines. (I76ef9)May 3, 2023
androidx.compose.ui:ui-*:1.4.3 is released. Version 1.4.3 contains these commits.
Bug Fixes
AndroidView may not be laid out correctly when used with certain Modifiers. (I4dc77, b/274797771)DropDown Menus (b/276811828)focusProperties. (b/271324781, b/274897776)April 19, 2023
androidx.compose.ui:ui-*:1.4.2 is released. Version 1.4.2 contains these commits.
Bug Fixes
AndroidView would not reuse its modifiers correctly, potentially resulting in unexpected behavior and crashes. (Ib67ee, b/275919849)Dialog composable (I82551, b/262140644)April 5, 2023
androidx.compose.ui:ui-*:1.4.1 is released. Version 1.4.1 contains these commits.
Bug Fixes
ParentDataModifier not affecting AndroidView (b/274797771)March 22, 2023
androidx.compose.ui:ui-*:1.4.0 is released. Version 1.4.0 contains these commits.
Important changes since 1.3.0
PinnableContainer API that allows lazy list items to be pinned, so that they are not disposed when they are scrolled out of bounds. For example, Modifier.focusable() uses this mechanism to pin the currently focused item. (Ib8881, b/259274257, b/195049010)Modifier.Node APIs. (I7f4d7, b/247708726, b/255352203, b/253043481, b/247716483, b/254529934, b/251840112, b/251859987, b/257141589)IsContainer semantics property on Surfaces. This property will be used in a later change that determines traversal order based on the semantic meaning of elements such as surfaces. (I63379)DropdownList. This can be used to replicate TalkBack's behavior when focusing android.widget.Spinner. (I177e5, b/236159001)PlatformTextStyle(emojiSupportMatch) to optionally disable emoji support processing for a single Paragraph. (Ia7100, b/139326806)waitForIdle). This may affect tests that assert on individual frames of layout animations. (I8ea08, b/222093277)TextMotion to TextStyle to define Text either to be Static(default) or Animated. Use TextMotion.Animated if Text is going to be scaled, translated, or rotated via animation. (I24dd7)March 8, 2023
androidx.compose.ui:ui-*:1.4.0-rc01 is released. Version 1.4.0-rc01 contains these commits.
API Changes
AndroidView composable function, which accepts the onReset param. It allows View instances to be reused when their node in the composition is discarded and reused in a compatible way. This is especially useful for LazyRows and LazyColumns of Views. (I3f10d, b/230099236)PlatformTextInputAdapter API for building custom text input implementations that talk directly to platform APIs. (I58df4)Bug Fixes
BasicTextField's SetText semantics action will now update the text buffer using the same code path as IME updates and the testing functions (e.g. performTextReplacement).performTextClearance, performTextReplacement, and performTextSelection now use SemanticsActions. (I0807d, b/269633168, b/269624358)February 22, 2023
androidx.compose.ui:ui-*:1.4.0-beta02 is released. Version 1.4.0-beta02 contains these commits.
API Changes
modifierElementOf() API. Please extend from ModifierNodeElement directly instead. (I2256b)Modifier.Node.onReset() callback allowing you to reset some local state to properly handle the case when the Layout will be reused (for example as an item of LazyColumn). Fixed FocusTargetModifierNode to properly reset the focused state. (I65495, b/265201972)BlendMode parameter to DrawScope.drawText, Paragraph.paint, and MultiParagraph.paint methods to support different blending algorithms when drawing text on Canvas. (I57508)Bug Fixes
February 8, 2023
androidx.compose.ui:ui-*:1.4.0-beta01 is released. Version 1.4.0-beta01 contains these commits.
API Changes
PinnableContainer.PinnedHandle.unpin() was renamed to release() (I4667a)waitUntilNodeCount, waitUntilAtLeastOneExists, waitUntilExactlyOneExists and waitUntilDoesNotExist as experimental API to ComposeTestRule, extending the waitUntil API to accept any matcher and any count of nodes. See ComposeTestRule for further documentation. (Ifa1b9, b/226934294)Font.MaximumAsyncTimeout to Font.MaximumAsyncTimeoutMillis. (I07af5)GoogleFont.Provider.AllFontsListUri and linked to it in ktdoc instead. (I16f29)Bug Fixes
AndroidFont.fontVariationSettings (I7d9e2)January 25, 2023
androidx.compose.ui:ui-*:1.4.0-alpha05 is released. Version 1.4.0-alpha05 contains these commits.
API Changes
runComposeUiTest function and create*ComposeRule functions that accept CoroutineContext parameters. The context will be used for the test composition and any LaunchedEffect and rememberCoroutineScope() calls in the composition. (I10614, b/265177763)FocusRequester is now marked as @Stable. (I580ee)DialogProperties constructor that takes a usePlatformDefaultWidth parameter. (Ic4048)PathMeasure.getPosition() and PathMeasure.getTangent() (I3b47c)PlatformParagraphStyle. (I07f47)AnnotatedString.hasStringAnnotations to query for annotations with zero-allocations. (I94dfe, b/246960758)TextMeasurer.measure function which takes in a String as text. (I47b2d, b/242705342)LineBreak and Hyphens APIs in TextStyle are graduated to stable. (Ic1e1d)External Contribution
notifyFocusedRect methods in TextInputSession and TextInputService are not deprecated again. (I23a04, b/262648050)January 11, 2023
androidx.compose.ui:ui-*:1.4.0-alpha04 is released. Version 1.4.0-alpha04 contains these commits.
New Features
PinnableContainer API that allows lazy list items to be pinned, so that they are not disposed when they are scrolled out of bounds. For example, Modifier.focusable() uses this mechanism to pin the currently focused item. (Ib8881, b/259274257, b/195049010)Modifier.Node APIs. (I7f4d7, b/247708726, b/255352203, b/253043481, b/247716483, b/254529934, b/251840112, b/251859987, b/257141589)IsContainer semantics property on Surfaces. This property will be used in a later change that determines traversal order based on the semantic meaning of elements such as surfaces. (I63379)DropdownList. This can be used to replicate TalkBack's behavior when focusing android.widget.Spinner. (I177e5, b/236159001)PlatformTextStyle(emojiSupportMatch) to optionally disable emoji support processing for a single Paragraph. (Ia7100, b/139326806)waitForIdle). This may affect tests that assert on individual frames of layout animations. (I8ea08, b/222093277)TextMotion to TextStyle to define Text either to be Static(default) or Animated. Use TextMotion.Animated if Text is going to be scaled, translated, or rotated via animation. (I24dd7)API Changes
maxSize: IntSize argument in drawText with size: Size to be inline with other DrawScope functions. size is set to Size.Unspecified by default which should not change the previous default behavior. (Icd27d)Group now has a field, isInline, that indicates if the group is for a call to an inline composable function. If isInline is true then the call is to an inline composable function. However, the value might be false for calls to inline composable functions that are from modules that are compiled with a version of the compose compiler plugin that doesn't generate the inline function information. (Idb846)FontVariation API is now stable (I8779f, b/241016309)Font() constructors are now stable API (I5948b, b/261435386)DeviceFontFamilyName is now stable (I8b640, b/261435386)AndroidFont constructor with variationSettings is now a stable API, and can be used to create new types of font descriptors. (I5adcc, b/261565807)createFontFamilyResolver API is now stable. This can be used to catch uncaught exceptions during async font loading. (Ibb481, b/261435386)Font.loadingStrategy API is now stable. (I5937c, b/261435386)GoogleFont API is now stable. (Ic90b0, b/261435386)TextUnit(float, TextUnitType) is now stable API. (I90c84, b/261561612)pluralStringResource is now stable API. (I09849, b/261439703)December 7, 2022
androidx.compose.ui:ui-*:1.4.0-alpha03 is released. Version 1.4.0-alpha03 contains these commits.
API Changes
ExperimentalComposeUiApi from PointerIcon (I23af8)PageUp, PageDown, PageLeft, PageRight. Note that these are only available from API 29. (Ida4ab)rememberNestedScrollConnection parameter view from root view to host view. (Ia5200)Clickable to correctly delay press interactions, when gestures could become scroll events.Clickables not correctly delaying ripples, when used inside an Scrollable ViewGroup.CompositingStrategy.Always to Offscreen to indicate that the graphicsLayer will always be rendered into an intermediate buffer (I47dc1)PerfettoTrace.record {} and PerfettoTraceRule to capture Perfetto traces (also known as System Traces) as part of a test, to inspect test behavior and performance. (I3ba16)withFrameNanos callbacks will not be dispatched until after all frame callbacks have finished running. This matches the behavior of compose when running normally. However, tests that rely on the old behavior may fail. This should only affect code that calls withFrameNanos or withFrameMillis directly, and has logic outside of callback passed to those functions that may need to be moved inside the callbacks. See the animation test changes in this CL for examples.onPerformTraversals: (Long) -> Unit parameter to TestMonotonicFrameClock constructor and factory function to run code after withFrameNanos callbacks but before resuming callers' coroutines. (Idb413, b/254115946, b/222093277, b/255802670)@Preview for dynamic colour support (I9f512)Bug Fixes
Recomposer finishes applying changes. (Iad6c0, b/222093277)captureToImage to allow for capturing multi window screenshots. This is useful for screenshot tests that use compose PopUps. (I169c5)Dependency Updates
November 9, 2022
androidx.compose.ui:ui-*:1.4.0-alpha02 is released. Version 1.4.0-alpha02 contains these commits.
API Changes
GraphicsLayerScope to expose the current size of the graphicsLayer. This is useful for computing graphicsLayer transformations as a function of the Composable size. (If8c43,b/181387080)CompositingStrategy to determine when to leverage an offscreen compositing layer for rendering of graphicsLayer content. Auto maintains the default behavior which internally leverages a layer if alpha is applied or a RenderEffect/Overscroll. Always will always introduce an offscreen buffer where ModulateAlpha will avoid leveraging an offscreen buffer and instead will modulate each of the recorded drawing instructions within the graphicsLayer. ModulateAlpha usage will still leverage an offscreen buffer for RenderEffect/Overscroll usages (I25e82, b/256382834)invalidateSubtree() was added to Modifier.Node to allow invalidating entire hierarchies for layout and drawing. (I4bd90)rememberNestedScrollInteropConnection to stable. Introduced the ability to pass a root view to rememberNestedScrollInteropConnection. This can help the custom view better react to scrolling constraints, specially in non-standard views (e.g. ModalBottomSheetDialog). (I9e107)ObserverNode interface that can be used by Modifier.Node implementations that need to be notified when a value that they had previously read has changed (I5728b, b/247716483)Paint that accepts a native android.graphics.Paint. Also added an extension function toComposePaint() that converts an existing native Paint object to Compose Paint. (Ica91b)FontFamily.Resolver.resolveAsTypeface for use on Android. (I8950b)ToolingState to allow tooling to change internal states of Composable (Ie6614)minLines parameter into material and material3 Text, TextField and OutlinedTextField which allows setting the minimum height of the component in terms of number of lines (I4af1d)October 24, 2022
androidx.compose.ui:ui-*:1.4.0-alpha01 is released. Version 1.4.0-alpha01 contains these commits.
API Changes
awaitEachGesture(), for gesture detectors was added. It operates similar to forEachGesture(), but the loop over gestures operates entirely within the AwaitPointerEventScope so events can't be lost between iterations.forEachGesture() has been deprecated in favor of awaitEachGesture() because it allows events to be lost between gestures. (Iffc3f, b/251260206)DrawStyle as an Experimental attribute to TextStyle and SpanStyle to enable drawing outlined text. (If24b8, b/155421273)AnnotatedString.Builder now implements kotlin.text.Appendable. (I1a061, b/231030444)AnnotatedString.Builder now has an append(AnnotatedString, start: Int, end: Int) method to append a substring of an AnnotatedString and the intersecting styles.DrawStyle parameter to Paragraph and MultiParagraph paint functions that enables drawing outlined text. (Ic8102, b/155421273)External Contribution
vighnesh for adding TV Devices to Previews (Ie15cd)January 11, 2023
androidx.compose.ui:ui-*:1.3.3 is released. Version 1.3.3 contains these commits.
Bug Fixes
December 7, 2022
androidx.compose.ui:ui-*:1.3.2 is released. Version 1.3.2 contains these commits.
Bug Fixes
protobuf-javalite:3.19.4 (CVE-2022-3171) (b/255545055)November 9, 2022
androidx.compose.ui:ui-*:1.3.1 is released. Version 1.3.1 contains these commits.
October 24, 2022
androidx.compose.ui:ui-*:1.3.0 is released. Version 1.3.0 contains these commits.
Important changes since 1.2.0
LookaheadLayout (enabling previously impossible animation behaviors)Modifier.Node (higher-performance alternative to Modifier.composed)October 5, 2022
androidx.compose.ui:ui-*:1.3.0-rc01 is released. Version 1.3.0-rc01 contains these commits.
API Changes
Bug Fixes
DeviceFontFamilyName fonts will not configure wght and ital variation settings by default, instead using platform setting for loaded Typeface. (Ia7a6d, b/246989332)LazyColumn memory leak - onModifierLocalsUpdated was not being called with the default value when modifiers were reused (b/230168389)September 21, 2022
androidx.compose.ui:ui-*:1.3.0-beta03 is released. Version 1.3.0-beta03 contains these commits.
API Changes
size:IntSize argument with constraints: Constraints in TextMeasurer.measure method to support minimum width constraints. (I37530, b/242707525)Bug Fixes
BackHandler API now works within a Dialog composable. (I35342)September 7, 2022
androidx.compose.ui:ui-*:1.3.0-beta02 is released. Version 1.3.0-beta02 contains these commits.
API Changes
Changes to experimental Focus APIs:
FocusDirection.In and FocusDirection.Out are deprecated and replaced by FocusDirection.Enter and FocusDirection.Exit. (Ia4262, b/183746982)FocusManager.moveFocus(Enter) and FocusManager.moveFocus(Exit). (I5f3f9, b/183746982)FocusRequester.Cancel to cancel a focus move. FocusRequester.Cancel can be used in any of the following focus properties: up, down, left, right, next, previous, start, end, enter and exit. (Ib300f)August 24, 2022
androidx.compose.ui:ui-*:1.3.0-beta01 is released. Version 1.3.0-beta01 contains these commits.
Modifier Node Refactor
The layer which handles Modifier/Modifier.Element instances and coordinates their behavior on LayoutNodes has been majorly refactored. As it stands this was a refactor which did not affect the public API of any of the many modifiers in Compose, and can be viewed as an implementation-only change. Despite that, this is an important change for various reasons. (Ie4313)
Change Summary
The added experimental Modifier.Node APIs provide an abstraction that allows for state to be maintained on an instance that will be retained with the lifecycle of the layout node, and will be allocated per-layout-node and per-usage of the corresponding Modifier.Element that produced it.
Broadly speaking, this abstraction provides an alternative mechanism to produce stateful modifiers without relying on the mechanics of the Modifier.composed API.
Risk
This change is strictly binary compatible with prior releases, and is intended to be backwards compatible in terms of observable behavior as much as practical and reasonable. That said, there are few subsystems of compose this refactor did not touch, and it is likely that behavior has changed in ways that were not covered by our tests and have not yet been found and fixed.
Please upgrade to this release with caution. If you believe this has broken something for you, please let us know.
Experimental APIs
Various experimental APIs have been added, all relating to the new concept of a "Modifier Node". Modifier.Node’s are created as a result of
fun modifierElementOf(…): Modifierabstract class ModifierNodeElementabstract class Modifier.Nodeabstract class DelegatingNodeinterface LayoutModifierNodeinterface DrawModifierNodeinterface SemanticsNodeinterface PointerInputNodeinterface ModifierLocalNodeinterface ParentDataModifierNodeinterface LayoutAwareModifierNodeinterface GlobalPositionAwareModifierNodeinterface IntermediateLayoutModifierNodeBehavior breaking change
Maximum supported elevation in dialogs and popups has been reduced to 8dp.
The maximum supported elevation for Compose dialogs and popups has been reduced from 30dp to 8dp. This change affects both material and ui custom dialogs and popups. This change is made to mitigate an accessibility bug on Android versions below S, and to ensure that accessibility services within those windows are able to interact with the content inside the dialog or popup.
You will only be impacted by this change if you are creating a custom dialog or popup implementation with an elevation set to levels higher than 8dp. Consider lowering the elevation of your dialog or popup. If you need to opt-out from this new behavior, consider forking your own dialog or popup with the desired elevation set. This is not recommended, as accessibility might be negatively impacted and it is on the developer to ensure the bottom part of the dialog or popup is interactable and readable by accessibility services.
API Changes
painterResource wouldn't update on configuration changes (I58e73, b/228862715)rememberTextMeasurer no longer takes FontFamily.Resolver, Density, or LayoutDirection parameters. Please use the TextMeasurer constructor to provide custom values for these parameters. (Ia1da3)DialogProperties.decorFitsSystemWindows property
to allow Dialogs to support WindowInsets. (I57742, b/229378542)FontVariation.Setting is a sealed interface, to allow future clamping APIs. (I11021, b/143703328)CompositionGroup.findParameters to SlotTree.kt. This allows tools to retrieve parameters for a CompositionGroup without having to parse the entire slot table. (I124fe)August 10, 2022
androidx.compose.ui:ui-*:1.3.0-alpha03 is released. Version 1.3.0-alpha03 contains these commits.
API Changes
LayoutCoordinates.findRootCoordinates() is now public (I7fa37, b/204723384)LayoutCoordinates in the PlacementScope. This lets developers know where the current layout is to place children relative to its position. (I5482b, b/238632578)LayoutCoordinates.transformFrom to get the Matrix transformation from one LayoutCoordinates to another. (Ic5ab1, b/238632578)SemanticsModifier.id and moved the semantics id to LayoutInfo.semanticsId instead. (Iac808, b/203559524)DeviceFontFamilyNameFont (Ic1279, b/143703328)FontVariation.Setting for configuring variable fonts on O+ devices. (I11a9d, b/143703328)FontVariation API for defining and using variable fonts. (I3c40c, b/143703328)LineHeightStyle.Alignment constructor is now public (experimental) (I4bbbe, b/235876330)PlatformTextStyle and LineHeightStyle. (I64bef)TextInputService.show|hideSoftwareKeyboard. Please use SoftwareKeyboardController instead in app code and TextInputSession in IME-management code. (I14e4c, b/183448615)Bug Fixes
@RequiresPermission to APIs that require granting the POST_NOTIFICATIONS permission on SDK 33 and above. (Ie542e, b/238790278)July 27, 2022
androidx.compose.ui:ui-*:1.3.0-alpha02 is released. Version 1.3.0-alpha02 contains these commits.
API Changes
PointerInputChange#pressure to retrieve the pressure. (I45a5e, b/205164819)rememberTextMeasurer to easily create and remember TextMeasurer instances in composition. (I8d66e)Rect, RoundRect, and MutableRect now support the Kotlin in syntax for calling the contains function. (Ie42b0, b/238642990)KeyInjectionScope, as they can be easily implemented with simpler parts of the API. The functions that have been removed include pressKeys, keysDown and keysUp. (I81d77)KeyInjectionScope to include the suffix 'Millis' where the units of said constants and parameters are milliseconds. (Iabef5)toStringForLog() method to EditCommand to help troubleshoot text editing issues. (I53354, b/228862731)drawText extension function on DrawScope to provide a way to draw multi-styled text on composables and modifiers that operate on a DrawScope like Canvas and drawBehind. (I16a62, b/190787898)TextMeasurer that enables arbitrary text layout computation that creates identical results to BasicText, independent from Compose runtime. (I17101)mapTree to SlotTree.kt. This allows tools to inspect the SlotTree without making an in memory copy first like asTree does. For the Layout Inspector this gives a performance improvement of about a
factor 10. (I5e113)MultiPreview annotations from libraries. (I85699, b/233511976)Bug Fixes
InputEventChange events to Velocity Tracker we will consider now deltas instead of positions, this will guarantee the velocity is correctly calculated for all cases even if the target element moves (Icea9d, b/216582726, b/223440806, b/227709803)AnnotatedString.toUpperCase when annotations are present. (I0aca2, b/210899140)June 29, 2022
androidx.compose.ui:ui-*:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits.
API Changes
LookaheadLayout that supports a lookahead pass before the actual measure/layout. This allows a pre-calculation of the layout when it changes, while permitting the post-lookahead measure/layout to use the pre-calculated size/position to animate the size and positions towards the target. SubcomposeLayouts are not yet supported, but will be in an upcoming release. (I477f5)TextStyle and SpanStyle to modify opacity of the whole Text. (Ic2fac, b/234117635)UrlAnnotation annotation type and associated methods to support TalkBack link support in AnnotatedStrings. (I1c754, b/231495122)Bug Fixes
TextLayoutResult.getLineForOffset does not throw. (Idc5d6, b/235876324)External Contribution
WindowInfo.keyboardModifiers to observe its state within composable functions or via snapshotFlow (Icdb8a)August 10, 2022
androidx.compose.ui:ui-*:1.2.1 is released. Version 1.2.1 contains these commits.
Bug Fixes
July 27, 2022
androidx.compose.ui:ui-*:1.2.0 is released. Version 1.2.0 contains these commits.
Important changes since 1.1.0
Improvements in focus traversal:
BeyondBoundsLayout core APIFocusOrder and FocusPropertiesNew APIs for:
GraphicsLayer capabilities, including RenderEffectMany bugfixes and performance improvements
June 29, 2022
androidx.compose.ui:ui-*:1.2.0-rc03 is released. Version 1.2.0-rc03 contains these commits.
June 22, 2022
androidx.compose.ui:ui-*:1.2.0-rc02 is released. Version 1.2.0-rc02 contains these commits.
June 15, 2022
androidx.compose.ui:ui-*:1.2.0-rc01 is released. Version 1.2.0-rc01 contains these commits.
API Changes
KeyInjectionScope for injecting key presses while other keys are held down or toggled on. These functions include withKeysDown, withKeysToggled etc. Also added properties for checking if a particular meta key is down, for example, isCtrlDown to check if either control key is depressed. Refer to KeyInjectionScope for documentation on each function. (I9f6cd, b/229831515)OverscrollEffect has been introduced to allow for custom overscroll effects, alongside the Modifier.scrollable overloads that accept it.LocalOverScrollConfiguration has been moved from foundation.gesture to foundation package and renamed to LocalOverscrollConfiguration (If19fb, b/204650733)runComposeUiTestWithoutActivity {} to runEmptyComposeUiTest {}, which aligns it with createEmptyComposeRule() (I6fed7)June 1, 2022
androidx.compose.ui:ui-*:1.2.0-beta03 is released. Version 1.2.0-beta03 contains these commits.
API Changes
pressKeyTimes as well as isCapsLockOn and friends to KeyInjectionScope. Additionally, the API now supports mouse and keyboard combined injection patterns such as clicking a mouse button with a meta key held down. (I4c8da, b/229831515)performKeyInput to send key events, or send them through the key property of MultiModalInjectionScope during a multi modal input gesture with performMultiModalInput. See KeyInjectionScope for documentation of the API. (Ic5000, b/229831515)GoogleFont.Provider.AllFontsListUri for retrieving the canonical internet source of Google Fonts supported by Android.Bug Fixes
InputEventChange events to Velocity Tracker we will consider now deltas instead of positions, this will guarantee the velocity is correctly calculated for all cases even if the target element moves (I51ec3, b/216582726, b/223440806, b/227709803)Show Layout Bounds setting will now be applied for composables immediately after toggling it from the quick settings tile, without having to leave and re-enter the activity. (I843d5, b/225937688)StyleSpans, which
lead to crashes if FontFamily.Resolver had been overwritten. (I4609d)DeleteSurroundingTextCommand and DeleteSurroundingTextInCodePointsCommand now require their constructor arguments to be non-negative. (Ica8e6, b/199919707)May 18, 2022
androidx.compose.ui:ui-*:1.2.0-beta02 is released. Version 1.2.0-beta02 contains these commits.
API Changes
Bug Fixes
ViewCompositionStrategy.DisposeOnDetachedFromWindowIfNotInPoolingContainer has been renamed to DisposeOnDetachedFromWindowOrReleasedFromPool to better reflect that when disposals do occur, rather than simply when they do not occur. (If15ca)May 11, 2022
androidx.compose.ui:ui-*:1.2.0-beta01 is released. Version 1.2.0-beta01 contains these commits.
New Features
API Changes
BeyondBoundsInterval that can be used by custom implementations of LazyList when they layout items beyond visible bounds (Ifabfb, b/184670295)Modifier.composed are now stable API (Ie65e4, b/229988420)rememberNestedScrollConnection API to use composition locals to acquire the current view information (I67ca7)@ComposableTarget annotation and annotations marked by @ComposableTargetMarker can now be used at the file scope using the @file prefix. Using a target annotation at the file scope will cause the compiler to assume all composable functions in the file are intended to be target the associated applier. For example, using @file:UiComposable declares that all @Composable functions target the Compose UI applier. A function that needs to target another applier must explicitly supply the target marker annotation for the desired applier. (I40804)Introduced new experimental, platform independent, test API:
an interface ComposeUiTest and a fun runComposeUiTest(block:
ComposeUiTest.() -> Unit), that can be used to run Compose Ui tests
without the need for a TestRule. To run a test without a
ComposeTestRule, pass the test as a lambda to runComposeUiTest, and use
the methods and members in the receiver scope ComposeUiTest, which are
the same ones as in ComposeContentTestRule.
The Android specific interface AndroidComposeUiTest and fun
runAndroidComposeUiTest(block: AndroidComposeUiTest.() -> Unit) are
added to provide access to the underlying Activity, similar to
AndroidComposeTestRule. For even more control, you can instantiate a
class AndroidComposeUiTestEnvironment yourself.
The Desktop implementation is the class DesktopComposeUiTest, but no
Desktop specific run functions are offered at the moment.
Migrating a test from a ComposeTestRule to ComposeUiTest can be done
like this (Android example). From:
@RunWith(AndroidJUnit4::class)
class MyTest {
@get:Rule val rule = createComposeRule()
@Test
fun test() {
rule.setContent {
Text("Hello Compose!")
}
rule.onNodeWithText("Hello Compose!").assertExists()
}
}
To:
@RunWith(AndroidJUnit4::class)
class MyTest {
@Test
@OptIn(ExperimentalTestApi::class)
fun test() = runComposeUiTest {
setContent {
Text("Hello Compose!")
}
onNodeWithText("Hello Compose!").assertExists()
}
}
For now, ComposeContentTestRule and ComposeTestRule don't extend from ComposeUiTest, which means extension functions on ComposeUiTest can't be called yet on the TestRule interface. When ComposeUiTest graduates to stable API, ComposeContentTestRule and ComposeTestRule will be changed to extend from ComposeUiTest. (Ib4e90)
LineHeightBehavior is renamed as LineHeightStyle
LineVerticalAlignment is renamed as LineHeightStyle.Alignment
Renames LineHeightTrim is renamed as LineHeightStyle.Trim
Default constructor values from LineHeightStyle is removed (I582bf, b/181155707)
Added Brush to TextStyle and SpanStyle to provide a way to draw text with gradient coloring. (I53869, b/187839528)
trimFirstLineTop, trimLastLineBottom attributes of
LineHeightBehavior changed into a single enum: LineHeightTrim.
LineHeightTrim have values of 4 states defined by two booleans:
FirstLineTop, LastLineBottom, Both and None (Ifc6a5, b/181155707)
Added LineHeightBehavior to the TextStyle and ParagraphStyle. LineHeightBehavior controls whether line height is applied to the top of the first line and to the bottom of the last line. It also defines the alignment of line in the space provided by TextStyle(lineHeight).
For example it is possible to get a behavior similar to what CSS
defines via LineHeightBehavior(alignment = LineVerticalAlignment.Center, trimFirstLineTop=false, trimLastLineBottom = false).
trimFirstLineTop, trimLastLineBottom configurations works correctly only when includeFontPadding is false. (I97332, b/181155707)
PlatformParagraphStyle.lerp and PlatformSpanStyle.lerp functions are changed to be top level
functions (I9a268)
Bug Fixes
PointerInputChange::copy documentation now correctly states that it is a shallow copy. (I182f5)includeFontPadding. It is possible to turn off the includeFontPadding using TextStyle.platformTextStyle attribute. In the near future we will change the default behavior however until that time this allows us to better integrate line height improvements (aosp/2058653) and solve TextField clipping issues. (I01423, b/171394808)External Contribution
MouseInjectionScope.scroll(delta = someDelta) is now inverted on Android if we scroll vertically (if someDelta is positive, it will scroll downward) (Ifb697, b/224992993)April 20, 2022
androidx.compose.ui:ui-*:1.2.0-alpha08 is released. Version 1.2.0-alpha08 contains these commits.
API Changes
pluralStringResource functions were marked as experimental in order to allow evolution to support better internationalization in the future. (If24e4)Constraints.maxHeight is a no-op at the moment but will allow to do some calculation in the future, like ellipsizing based on the height. (I6afee, b/168720622)SubcomposeSlotReusePolicy.getSlotsToRetain() now accepts a custom MutableSet-like class which doesn't allow adding new items in it. (Icd314)@Stable interface (I9dafe)PointerInputChange. You can use consume() to consume the change completely. You can use isConsumed to determine whether or not someone else has previously consumed the change.PointerInputChange::copy() now always makes a shallow copy. It means that copies of PointerInputChange will be consumed once one of the copies is consumed. If you want to create an unbound PointerInputChange, use constructor instead. (Ie6be4, b/225669674)SemanticsProperty testTagsAsResourceId, which can be used to make Compose conform with UIAutomator tests designed for the View system. (I39c20)FontFamily.SansSerif. This will use fallback font names like sans-serif-medium internally on API 21-28. This is a behavior change as previously only weights 400 and 700 were supported on API 21-28. (I380fe, b/156048036, b/226441992)AndroidFont now takes typefaceLoader as a constructor parameter. (I2c971)April 6, 2022
androidx.compose.ui:ui-*:1.2.0-alpha07 is released. Version 1.2.0-alpha07 contains these commits.
API Changes
Snapshot.withoutReadObservation { ... } was added. It allows users to run the passed lambda without subscribing to the changes of the state values read during this block. You could find it useful in use cases when you want to benefit from the snapshot based thread safe write/reads, but want to be able to read the value without causing unnecessary recomposition or remeasure. (I9f365, b/214054486)consumeWindowInsets extension property of ComposeView allows developers to disable consumption of Android WindowInsets. This allows separate ComposeViews in the hierarchy to each apply WindowInsets without interfering with each other. (I0ef08, b/220943142)KeyboardType.Decimal as an alternative to Keyboard.Number for specifically including decimal separator in IME. (Iec4c8, b/209835363)PointerEventType.Scroll and PointerEvent.scrollDelta are stable APIs now (I574c5, b/225669674)FontFamily.Resolver to integrate System-wide bold text accessibility setting (I6c1e7)Font(AssetManager, String, ...) is deprecated, replaced with Font(String, AssetManager, ...). This is an experimental API. (I1c7a4)Font(DeviceFontFamilyName) to optionally lookup system-installed fonts during font fallback chains. (I30468, b/219754572)includeFontPadding in TextStyle/ParagraphStyle. includeFontPadding can be changed via TextStyle(platformStyle = PlatformTextStyle(includeFontPadding = true/false)). This is a temporary configuration option to enable migration and will be removed. (If47be, b/171394808)GoogleFont.Provider.isAvailableOnDevice extension for debugging help. (I64e31)GoogleFont.Provider constructor for use with @ArrayRes (Ic5ee1, b/225984280)Compose GoogleFont is now called Font(GoogleFont), API remains stable otherwise. (I125f2)Bug Fixes
March 23, 2022
androidx.compose.ui:ui-*:1.2.0-alpha06 is released. Version 1.2.0-alpha06 contains these commits.
API Changes
RequestFocus semantics action to request focus on the focusable target. (I17b71)VectorPainter if the current layout
direction is RTL. (I79cd9, b/185760237)Updated shadow/ambient colors to be trailing parameters of Modifier.graphicsLayer for API compatibility (I3f864, b/160665122)
Added default implementations to shadow/ambient color on GraphicsLayerScope to ensure non-breaking API changes
Added event time to RSB events (Ief8ae)
FocusOrder has now been merged into FocusProperties and focusProperties() now has all the capabilities of focusOrder(). FocusOrder and focusOrder() have been deprecated. focusOrder() that accepts a focusRequester should be replaced with a focusRequester() modifier in combination with focusProperties(). This allows the modifiers to have a stronger separation of concerns. (I601b7)
Upgrading both RecyclerView and Compose will now result in much better scrolling performance for RecyclerViews with Compose views as children.
Add ViewCompositionStrategy.Default as a means of retrieving the built-in default strategy
Add ViewCompositionStrategy.DisposeOnDetachedFromWindowIfNotInPoolingContainer, which is the new default strategy and properly handles pooling containers such as RecyclerView. (If7282)
Added support for annotating annotations classes with @Preview as a first step for adding the Multipreview feature. Such annotations could be used to annotate Composable methods or other annotation classes, which could then be considered as indirectly annotated with the given @Preview. (I12eff)
Reference devices added to the Devices list for @Preview (I071c9)
Bug Fixes
AnnotatedString.Builder.withStyle (If84d5)External Contribution
ambientShadowColor and spotShadowColor properties to GraphicsLayerScope (I1ba1a, b/160665122)pluralStringResource functions. (Ib2f23, b/191375123)March 9, 2022
androidx.compose.ui:ui-*:1.2.0-alpha05 is released. Version 1.2.0-alpha05 contains these commits.
API Changes
TextToolbar now takes lambda arguments instead of
ActionCallback. (Ib2eb9, b/197950089)Modifier.onPlaced and the OnPlacedModifier interface are
now stable. (Ib5482)BeyondBoundsLayout modifier local (If8b51, b/184670295)includeFontPadding=false is handled
and no clipping should occur for tall scripts. (I31c84, b/171394808)Bug Fixes
ComposeContentTestRule.setContent will now throw an
IllegalStateException if you try to set content when there already is
content. (I888a5, b/199631334)External Contribution
February 23, 2022
androidx.compose.ui:ui-*:1.2.0-alpha04 is released. Version 1.2.0-alpha04 contains these commits.
API Changes
Added ComposableTarget, ComposableTargetMarker and
ComposableOpenTarget that allows compile time reporting of when
a composable function is called targeting an applier it was not
designed to use.
In most cases the annotations can be inferred by the compose
compiler plugin so using these annotation directly should be
rare . The cases that cannot be inferred include creating and
using a custom applier, abstract composable functions (such as
interface methods), fields or global variables that are
composable lambdas (local variables and parameters are inferred),
or when using ComposeNode or a related composable functions.
For custom appliers the composable functions that calls
ComposeNode or ReusableComposeNode need to add a
ComposableTarget annotation for the function and any
composable lambda parameter types. It is recommended, however,
to create an annotation that is annotated with
ComposableTargetMarker and then the marked annotation be used
instead of ComposableTarget directly. A composable annotation
marked with ComposableTargetMarker is equivalent to a
ComposbleTarget with the fully qualified name of the attribute
class as the applier parameter. For an example of using
ComposableTargetMarker see anroidx.compose.ui.UiComposable. (I38f11)
Font(resId, ...) now takes loadingStrategy on stable API. (Ief3d2)
FontLoadingStrategy is now stable API. (I1ee35, b/174162090)
Support async font loading in Text (I77057, b/214587005)
Add bridge API for converting custom Font.ResourceLoader into FontFamily.Resolver. (Ia0060)
Bug Fixes
FontFamily.Resolver are passed to subcompositions
such as Popup.Font.ResourceLoader are passed to subcompositions
such as Popup. (I48fa5)February 9, 2022
androidx.compose.ui:ui-*:1.2.0-alpha03 is released. Version 1.2.0-alpha03 contains these commits.
API Changes
notifyFocusedRect methods in TextInputSession and
TextInputService are now deprecated and won't be called. Use
BringIntoViewRequester instead. (Ia4302, b/192043120, b/216842427, b/178211874)destroyDisplayListData
method on RenderNode stub class (I1e659, b/216660268)SubcomposeLayout you precomposed. (I857ea)Added movableContentOf which converts a composable
lambda into a lambda that moves it state, and corresponding nodes,
to any new location it is called. When the previous call leaves
the composition the state is temporarily preserved and if a new call
to the lambda enters the composition then the state, and associated
nodes, are moved to the location of the new call. If no new call is
added the state is removed permanently and remember observers are
notified.
If a movableContentOf lambda is called multiple times in the same
composition, new state and nodes are created for each call and, as
calls leave the composition and new calls enter, the state is moved
from the first leaving calls to the entering calls in the order they
are called. All state not claimed by new calls is removed
permanently. (Ib4850)
FontFamilyResolver is now available via LocalFontFamilyResolver.current
Added createFontFamilyResolver(context) and createFontFamilyResolver(context, coroutineScope) to create new
FontFamily resolvers outside of compose usage.
Paragraph and MultiParagraph now take FontFamily.Resolver
TextLayoutResult.layoutInput.fontFamilyResolver now contains
the resolver used for this layout, deprecated
TextLayoutResult.layoutInput.resourceLoader as it is no longer used. (Id5a45, b/174162090)
Support for async and optional font loading, with fallback behavior. This path is used by Text and TextField, and exposed through FontFamilyResolver
Support for preloading fonts via FontFamilyResolver.preload
FontFamilyResolver.setAsyncLoadContext allows setting the
global coroutine context used for loading async fonts. (I87fe8, b/174162090)
Added AndroidFont, a new low-level API for providing new types
of font resource descriptors on Android. For example, loading fonts from
an app-specific backend, optionally locating pre-installed fonts
on-device, or loading a font from a resource not provided by the current
Font factories.
Expanded Font.ResourceLoaded API to support optional and async
font loading. It is not recommended that application developers use this
API directly. To add new types of fonts see AndroidFont.
Font.AndroidResourceLoader extension function allows
construction of a Font.ResourceLoader when outside of composition.
Added loadingStrategy parameter to resource-based fonts, to allow
async loading when resource font references downloadable fonts XML. (Ie5aea, b/174162090)
Typeface(FontFamily) constructor is deprecated. This was
previously used to preload fonts, which may take up to 10 seconds for
downloadable fonts. With downloadable fonts, this call may block for 10
seconds. Instead use FontFamilyResolver.preload.
fontResource(FontFamily): Typeface is deprecated. This was
previously used to preload fonts, which may take up to 10 seconds for
downloadable fonts. Instead use FontFamilyResolver.preload (If8e7c, b/174162090)
SubcomposeLayoutState constructor accepting maxSlotsToRetainForReuse is now deprecated. Instead there is a new constructor accepting SubcomposeSlotReusePolicy - a new interface allowing more granular control on what slots should be retained for the future reuse. (I52c4d)
Exposes HSV and HSL function in Color as non-experimental
API. The Oklab color space is now public API. (I08fb6, b/180731008)
Deprecated AndroidComposeTestRule.AndroidComposeStatement,
which was not meant to be in public API and didn't do anything for you
anyway. (Ibc46b)
Internal generated kt class rename (Ia0b9e, b/174162090)
Removed FontLoadingStrategy.values (I42a9d, b/174162090)
Global font loader is now called FontFamilyResolver. (I4f773, b/174162090)
Use new font loading system for desktop. (I9ce5c, b/174162090)
FontFamily.Resolver.resolve returns State<Any> (I4406c, b/174162090)
Bug Fixes
ADJUST_PAN. (I8eaeb, b/190539358, b/192043120)FontFamily.ResolverFontLoader is deprecatedcreateFontFamilyResolver factory on Desktop (I6bbbb, b/174162090)January 26, 2022
androidx.compose.ui:ui-*:1.2.0-alpha02 is released. Version 1.2.0-alpha02 contains these commits.
API Changes
Modifier.onRotaryScrollEvent() and Modifier.onPreRotaryScrollEvent() for wear devices with a rotating side button (I18bf5, b/210748686)View.createLifecycleAwareRecomposer
extension (I0cde6)External Contribution
PointerEvent.scrollDelta.y is now inverted on Android (now it returns 1 instead of -1 if we tilt mouse wheel to the right) (Ia9811)January 12, 2022
androidx.compose.ui:ui-*:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits.
API Changes
FontFamily.canLoadSynchronously. This property has
no semantic meaning. (Ica5ef)CompositionData for generating
invariant ids in the Layout Inspector. (Ic116e)Dependency Updates
1.6.10.February 23, 2022
androidx.compose.ui:ui-*:1.1.1 is released. Version 1.1.1 contains these commits.
Bug Fixes
NullPointerException at androidx.compose.ui.platform.RenderNodeLayer.updateDisplayList (aosp/1947059, b/206677462)LazyVerticalGrid (aosp/1931080, b/207510535)February 9, 2022
androidx.compose.ui:ui-*:1.1.0 is released. Version 1.1.0 contains these commits.
Important changes since 1.0.0
January 26, 2022
androidx.compose.ui:ui-*:1.1.0-rc03 is released. Version 1.1.0-rc03 contains these commits.
Bug Fixes
December 15, 2021
androidx.compose.ui:ui-*:1.1.0-rc01 is released. Version 1.1.0-rc01 contains these commits.
Bug Fixes
SemanticsNodeInteraction.captureToImage() will now also work if HardwareRenderer.isDrawingEnabled() is false, by enabling it for the duration of the call (Idf3d0)December 1, 2021
androidx.compose.ui:ui-*:1.1.0-beta04 is released. Version 1.1.0-beta04 contains these commits.
New Features
1.6.0API Changes
androidx.core.view (I7078a, b/204917439)Modifier.composed overloads that accept
keys to compare for equality and qualify for skipping optimizations. (Ice799, b/205851704)ComposeNotIdleException now extends from Exception instead
of directly from Throwable. Note that this means that catch clauses
that were catching Exception might now catch
ComposeNotIdleExceptions, where they wouldn't do that previously. (I9c217)Bug Fixes
November 17, 2021
androidx.compose.ui:ui-*:1.1.0-beta03 is released. Version 1.1.0-beta03 contains these commits.
API Changes
InjectionScope.flush() and
InjectionScope.dispose(). Flushing of all events and disposing of the
scope now happens at the end of the called perform*Input() method like
before. (I2bed8)MultiModalInjectionScope.Touch and
MultiModalInjectionScope.Mouse. In order to inject touch and mouse
events for multi-modal gestures, you can now use
MultiModalInjectionScope.touch() and
MultiModalInjectionScope.mouse(), both of which accept a lambda that
has the receiver scope of that modality. (Idde18)Bug Fixes
durationMillis in
TouchInjectionScope.swipeWithVelocity is now calculated such that the
swipe is feasible. (I19deb)November 3, 2021
androidx.compose.ui:ui-*:1.1.0-beta02 is released. Version 1.1.0-beta02 contains these commits.
API Changes
External Contribution
October 27, 2021
androidx.compose.ui:ui-*:1.1.0-beta01 is released. Version 1.1.0-beta01 contains these commits.
API Changes
BringIntoView API that lets you send a request to parents so that they scroll to bring an item into view (Ib918d, b/195353459)October 13, 2021
androidx.compose.ui:ui-*:1.1.0-alpha06 is released. Version 1.1.0-alpha06 contains these commits.
API Changes
ExperimentalComposeUiApi from ViewRootForInspector
and LayoutInfo.ownerViewId (I5c2e3)InternalCompilerApi from Composer methods that are
required to be called cross-module (I1aa0b)SemanticsNodeInteraction.performSemanticsAction now returns
the SemanticsNodeInteraction on which the function was called. (I9e5db)viewConfiguration: ViewConfiguration to LayoutInfo
to allow consumers get the correct value for things like long press
timeout. (I76ca6)
viewConfiguration: ViewConfiguration to
InjectionScope to allow tests to adjust input injection based on
things like long press timeout or touch slop.InjectionScope.viewConfiguration.Recomposer.state has been deprecated and replaced by
Recomposer.currentState to change its type to a StateFlow (Ic2ab3, b/197773820)flush() and dispose() to InjectionScope. Use them
when you want to flush all queued up events immediately and when you
want to dispose of the scope, respectively. (Ifb73a)performScrollToNode(matcher: SemanticsMatcher) that
scrolls a scrollable container to the content that is matched by the
given matcher. (Ic1cb8)InjectionScope now implements Density, allowing you to
easily convert between px and dp in performTouchInput and friends. (I8fe1f)Bug Fixes
September 29, 2021
androidx.compose.ui:ui-*:1.1.0-alpha05 is released. Version 1.1.0-alpha05 contains these commits.
API Changes
density: Density and layoutDirection:
LayoutDirection to LayoutInfo. This allows consumers of LayoutInfo
to interpret the dimensions and position exposed in LayoutInfo
properly. (I002f1)performMouseInput to start sending mouse events, or send mouse events
through the Mouse property of MultiModalInjectionScope during a
multi modal input gesture with performMultiModalInput. See
MouseInjectionScope for documentation of the available API. (Iaa4a8, b/190493367)Bug Fixes
TouchInjectionScope.swipeWithVelocity. It now
accepts a wider range of input variables and will suggest changes to the
input if a swipe can't be created (I40fbe, b/182477143)September 15, 2021
androidx.compose.ui:ui-*:1.1.0-alpha04 is released. Version 1.1.0-alpha04 contains these commits.
API Changes
PointerEvent now has a PointerEventType
to support hover events. (I091fa)performGesture and GestureScope, which have
been replaced by performTouchInput and TouchInjectionScope. (Ia5f3f, b/190493367)touchBoundsInRoot to SemanticsNode that
includes the minimum touch target size so that developers
can ensure that touch targets meet accessibility minimums. (I2e14b, b/197751214)Introduced performTouchInput and TouchInjectionScope as a
replacement for performTouchInput and TouchInjectionScope, paving
the way for other modalities (like mouse).
TouchInjectionScope has the same methods as GestureScope, with the
exception of movePointerTo and movePointerBy, which have been
renamed to updatePointerTo and updatePointerBy. All other methods
are the same.
The behavior of TouchInjectionScope is almost identical to
GestureScope, with two small details:
updatePointerTo() has been
used, but not move(), and then down() is called), the previous
implementation would advance the event time and send a move event
before sending the down event. The new implementation still sends the
move event, but doesn't advance the event time in this specific
scenario.Finally, TouchInjectionScope introduces a new method
currentPosition(pointerId: Int) to get the current position of the
given pointer. (If1191, b/190493367)
Bug Fixes
September 1, 2021
androidx.compose.ui:ui-*:1.1.0-alpha03 is released. Version 1.1.0-alpha03 contains these commits.
New Features
1.1.0-alpha03 to depend on Kotlin 1.5.30. (I74545)API Changes
Modifier.inspectable for wrapping other modifiers. (I1909b, b/191017532)BlurredEdgeTreatment API
to simplify blur use cases into more
commonly used combinations of clip flags
and TileModes. Most use cases involve
either letting blurred content render
outside the original content bounds
and blurring regions outside these bounds
with transparent black, or clipping content
to content bounds sampling the closest edge
for blur kernels that extend beyond content
bounds. (I6b4b7, b/166927547)Modifier.graphicsLayer to alter
the contents of the layer itself. This
can be used to blur contents of a composable
and child composables within a composition
hierarchy. (I47c4d, b/166927547)performScrollToIndex, performScrollToKey,
hasScrollToIndexAction and hasScrollToKeyAction are now stable API (I142ae, b/178483889)Bug Fixes
August 18, 2021
androidx.compose.ui:ui-*:1.1.0-alpha02 is released. Version 1.1.0-alpha02 contains these commits.
API Changes
performGesture will be initialized to the current time of the
MainTestClock. (Ifb364, b/192064452)DpRect(DpOffset, DpSize) constructor (I2cf16, b/194219828)Bug Fixes
August 4, 2021
androidx.compose.ui:ui-*:1.1.0-alpha01 is released. Version 1.1.0-alpha01 contains these commits.
API Changes
RelocationRequester.bringIntoView now accepts a rectangle as a parameter which enables us to bring a part of a composable into view (Ice2c5, b/194330245)AnimatedImageVector and the related APIs are now in the new
androidx.compose.animation:animation-graphics module. (I60873)Introduced BrushPainter API to support drawing of an arbitrary Brush within a Painter, similar to ColorPainter
Updated Brush API to have an intrinsic size parameter that is queried within BrushPainter (Ia2752, b/189466433)
Updated DrawScope#drawImage method that consumes source and destination rects to consume an optional FilterQuality parameter. This is useful for pixel art that is intended to be pixelated when scaled up for pixel based art. Updated BitmapPainter + Image composable to also consume an optional FilterQuality parameter (Ie4fb0, b/180311607)
Added GestureScope.advanceEventTime method to give more
control over the timing of events in a gesture (Ibf3e2)
Bug Fixes
Modifier.paint().border(). By having Modifier.paint
call drawContent after drawing the contents of the given
painter, we have better behavior consistency in behavior
with the modifier pattern. (Ibb2a7, b/178201337, b/186213275)usePlatformDefaultWidth to false to override this behaviour. (Iffaed, b/192682388)InfiniteAnimationPolicy to :compose:ui (I5eb09, b/160602714)November 3, 2021
androidx.compose.ui:ui-*:1.0.5 is released. Version 1.0.5 contains these commits.
Bug Fixes
October 13, 2021
androidx.compose.ui:ui-*:1.0.4 is released. Version 1.0.4 contains these commits.
Dependency Updates
1.5.31September 29, 2021
androidx.compose.ui:ui-*:1.0.3 is released. Version 1.0.3 contains these commits.
Dependency Updates
1.5.30September 1, 2021
androidx.compose.ui:ui-*:1.0.2 is released. Version 1.0.2 contains these commits.
Updated to support the Compose 1.0.2 release. Compose 1.0.2 is still compatible with Kotlin 1.5.21.
August 4, 2021
androidx.compose.ui:ui-*:1.0.1 is released. Version 1.0.1 contains these commits.
Dependency Updates
1.5.21.July 28, 2021
androidx.compose.ui:ui-*:1.0.0 is released. Version 1.0.0 contains these commits.
Major features of 1.0.0
This is the first stable release of Compose. Please see the official Compose Release blog for more details!
Known Issues
If you are using Android Studio Bumblebee Canary 4 or AGP 7.1.0-alpha04/7.1.0-alpha05, you may hit the following crash:
java.lang.AbstractMethodError: abstract method "void androidx.lifecycle.DefaultLifecycleObserver.onCreate(androidx.lifecycle.LifecycleOwner)"
To fix, temporarily increase your minSdkVersion to 24+ in your build.gradle file. This issue will be fixed in the next version of Android Studio Bumblebee and AGP 7.1. (b/194289155)
July 14, 2021
androidx.compose.ui:ui-*:1.0.0-rc02 is released. Version 1.0.0-rc02 contains these commits.
Bug Fixes
usePlatformDefaultWidth to false to override this behaviour. (Iffaed, b/192682388)July 1, 2021
androidx.compose.ui:ui-*:1.0.0-rc01 is released. Version 1.0.0-rc01 contains these commits.
New Features
ui-tooling and ui-tooling-preview (Iefa28, b/190649014)API Changes
FocusManager#moveFocusIn and FocusManager#moveFocusOut (I227d7, b/170154986, b/186567354, b/168510304)useDefaultMaxWidth in PopupProperties was renamed to usePlatformDefaultWidth. (I05710)Behavior Changes
@Preview now provides a
LocalActivityResultRegistryOwner that allows you
to preview Composables that use APIs like
rememberLauncherForActivityResult() that depend
on that owner existing. (Ib13d1, b/185693006)@Preview now provides a
LocalOnBackPressedDispatcherOwner that allows you
to preview Composables that use APIs like BackHandler
that depend on that owner existing. (Ia1c05, b/185693006)Bug Fixes
InfiniteAnimationPolicy to androidx.compose.ui:ui (I5eb09, b/160602714)June 16, 2021
androidx.compose.ui:ui-*:1.0.0-beta09 is released. Version 1.0.0-beta09 contains these commits.
API Changes
Bug Fixes
ImageBitmap() leads to a
NullPointerException.captureToImage() will indefinitely await the
next draw pass (i.e. it deadlocks).ComposeTestRule.waitUntil {} does not run the main thread while it’s waiting, making it effectively the same as ComposeTestRule.mainClock.advanceTimeUntil {}
More limitations are expected to be identified in the future. (I284fa)Added Profile Rules
This release adds profile rules to the following compose modules (I14ed6):
Profile rules for a library are specified in a text file baseline-prof.txt located in the src/main or equivalent directory. The file specifies a rule per line, where a rule in this case is a pattern for matching to methods or classes in the library. The syntax for these rules is a superset of the human-readable ART profile format that is used when using adb shell profman --dump-classes-and-methods .... These rules take one of two forms to target either methods or classes.
A method rule will have the following pattern:
<FLAGS><CLASS_DESCRIPTOR>-><METHOD_SIGNATURE>
And a class rule will have the following pattern:
<CLASS_DESCRIPTOR>
Here <FLAGS> is one or more of the characters H, S, and P to indicate whether or not this method should be flagged as "Hot", "Startup", or "Post Startup".
The <CLASS_DESCRIPTOR> is the descriptor for the class that the targeted method belongs to. For example, the class androidx.compose.runtime.SlotTable would have a descriptor of Landroidx/compose/runtime/SlotTable;.
The <METHOD_SIGNATURE> is the signature of the method, and includes the name, parameter types, and return types of the method. For example, the method fun isPlaced(): Boolean on LayoutNode has the signature isPlaced()Z.
These patterns can have wildcards (**, *, and ?) in order to have a single rule encompass multiple methods or classes.
A method that has the flag H indicates that this method is a "hot" method, and should be compiled ahead of time.
A method that has the flag S indicates that it is a method which is called at startup, and should be compiled ahead of time to avoid the cost of compilation and interpreting the method at startup time.
A method that has the flag P indicates that it is a method which is called after startup.
A class that is present in this file indicates that it is used during startup and should be pre-allocated in the heap to avoid the cost of class loading.
June 2, 2021
androidx.compose.ui:ui-*:1.0.0-beta08 is released. Version 1.0.0-beta08 contains these commits.
API Changes
NestedScrollSource enum is replaced by an inline class. (Ie321b, b/187055290)FocusManager.clearFocus(forcedClear = true) is renamed to FocusManager.clearFocus(force = true) (Ia0c41)@ExperimentalComposeUiApi from PopupProperties. (I01fa6)PointerType was changed from an enum to an inline class (If5058)Modifier.focusModifier() is deprecated and replaced by Modifier.focusTarget() (I6c860)Modifier.onSizeChanged() and Modifier.onGloballyPositioned() are not inlined functions anymore (I727f6, b/186109675)KeyboardType enum is replaced by an inline class. (I73045, b/187055290)FocusState enum with a FocusState interface (Iccc1a, b/187055290)PlaceholderVerticalAlign is converted into an inline class. (If6290)AnnotatedString.withAnnotation functions are
now ExperimentalTextApi instead of ExperimentalComposeApi. (I0cd0a)
Bug Fixes
detectDragGesures, detectVerticalGestures, and detectHorizontalGestures will consume the position change automatically, no need to call change.consumePositionChange in the onDrag callbacks (I42fc4, b/185096350, b/187320697)Modifier.onGloballyPositioned() was changed to report the coordinates of this modifier in the modifier chain, not the layout coordinates after applying all the modifiers. This means that now the ordering of modifiers is affecting what coordinates would be reported. (Ieb67d, b/177926591)May 18, 2021
androidx.compose.ui:ui-*:1.0.0-beta07 is released. Version 1.0.0-beta07 contains these commits.
API Changes
ViewRootForInspector interface for use in inspector (Ib70df)SubcomposeLayoutState now supports setting count of reusable slots. The layout will keep up to this count slots active instead of disposing them in order to reuse the slot next time we need a new one (Ieb981)FocusDirection enum is replaced by an inline class. (Ib6d03, b/187055290, b/184086802)Bug Fixes
TextGeomerticTransform and TextDecoration on AnnotatedString
will be applied as given. (I61900, b/184760917)May 5, 2021
androidx.compose.ui:ui-*:1.0.0-beta06 is released. Version 1.0.0-beta06 contains these commits.
API Changes
@ComposeCompilerApi no longer @RequiresOptIn (Iab690)SemanticsActions.ScrollToIndex to scroll a list with
indexed items to the item with a certain index, and
SemanticsProperties.IndexForKey to get the index of an item in a list
with keyed items. Both actions are implemented by LazyList.
SemanticsNodeInteraction.performScrollToIndex that
scrolls a list to the given index, and
SemanticsNodeInteraction.performScrollToKey that scrolls a list to the
item with the given key. (I4fe63, b/178483889, b/161584524)error that allows to mark a node that contains invalid input (I12997, b/180584804, b/182142737)Font() overloads to load fonts
from assets, File and FileDescriptor (I43007)TextFieldValue.Saver. Added addTtsAnnotation
and withAnnotation utility functions to
AnnotatedString.Builder (I8cbdc, b/178446304)TextUnit(value: Float, type: TextUnitType) (I7ecce, b/178446304)April 21, 2021
androidx.compose.ui:ui-*:1.0.0-beta05 is released. Version 1.0.0-beta05 contains these commits.
API Changes
FocusManager.moveFocus(In) and FocusManager.moveFocus(Out) (Ic5534, b/183746743)performTextInputSelection API (I2dcbb, b/178510628)InputEventCallback interface is deprecated.
It was not possible to use the interface in any
public API; and there was no usage of it in the
code. (I34a02, b/184003208)TextLayoutResult/createTextLayoutResult
function. It is an unused public function which was added
for testing. The function does not do anything usable for
Compose text APIs. The function is now deprecated and will
be removed later. (I80413)Bug Fixes
ACTION_SCROLL_FORWARD, ACTION_SCROLL_BACKWARD,
accessibilityActionScrollLeft, accessibilityActionScrollUp,
accessibilityActionScrollRight and accessibilityActionScrollDown
accessibility scroll actions. Instead of scrolling to the end of the
scrollable, it will now scroll by one screen in the given direction. (Ieccb0)April 7, 2021
androidx.compose.ui:ui-*:1.0.0-beta04 is released. Version 1.0.0-beta04 contains these commits.
API Changes
hideSoftwareKeyboard and showSoftwareKeyboard on
SoftwareKeyboardController to hide() and show() respectively.
Bug Fixes
LazyColumn/LazyRow located on the edges were incorrectly positioned after fast fling (Ie4d13, b/183877420)AndroidViewBinding now properly removes
fragments inflated via FragmentContainerView when
the AndroidViewBinding is removed from the compose
hierarchy. (Ib0248, b/179915946)AndroidViewBinding now correctly nests
fragments inflated via FragmentContainerView when
your ComposeView is within a Fragment, fixing
issues with saving and restoring the state of those
fragments. (I70eb0, b/179915946)1.3.2
and now consistently shows fragments inflated via
FragmentContainerView after configuration changes. (I0743d, b/179915946)March 24, 2021
androidx.compose.ui:ui-*:1.0.0-beta03 is released. Version 1.0.0-beta03 contains these commits.
API Changes
startX/endX and startY/endY parameters
to swipeUp/swipeDown/swipeLeft/swipeRight functions in
GestureScope. (I49e2d, b/182063305)March 10, 2021
androidx.compose.ui:ui-*:1.0.0-beta02 is released. Version 1.0.0-beta02 contains these commits.
API Changes
LocalSoftwareKeyboardController composition local
API to replace previous SoftwareKeyboardController interface on
TextField. (I5951e, b/168778053)LocalSoftwareKeyboardController composition local
API to replace previous SoftwareKeyboardController interface on
TextField. (I84472, b/168778053)SemanticsMatchers:
hasWidth(width, tolerance)hasHeight(height, tolerance)hasLeftPosition(left, tolerance)hasTopPosition(top, tolerance)hasRightPosition(right, tolerance)hasBottomPosition(bottom, tolerance) (If16bd)SemanticsMatchers as
@ExperimentalTestApi:
hasWidth(width, tolerance)hasHeight(height, tolerance)hasLeftPosition(left, tolerance)hasTopPosition(top, tolerance)hasRightPosition(right, tolerance)hasBottomPosition(bottom, tolerance) (Ia600c)SemanticsMatchers:
hasWidth(width, tolerance)hasHeight(height, tolerance)hasLeftPosition(left, tolerance)hasTopPosition(top, tolerance)hasRightPosition(right, tolerance)hasBottomPosition(bottom, tolerance) (I2f502)Bug Fixes
androidx.compose.ui:ui no longer depends on AppCompat or Fragment. If you are using a ComposeView in your application, and you are using Fragment and/or AppCompat, make sure that you are using AppCompat 1.3+ / Fragment 1.3+ - these versions are needed to correctly set lifecycle and saved state owners required for ComposeView. (I1d6fa, b/161814404)rememberSaveable { mutableStateOf(0) } when used inside a destination of navigation-compose. (I1312b, b/180042685, b/180701630)LocalSoftwareKeyboardController composition local
API to replace previous SoftwareKeyboardController interface on
TextField. (I658b6, b/168778053)ComposeRootRegistry's
tearDownRegistry() (Iddce1)February 24, 2021
androidx.compose.ui:ui-*:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.
This is the first release of Compose 1.0.0 Beta.
API Changes
detectDragGestures (I67269, b/179995594)InteractionState has been replaced with [Mutable]InteractionSource
interactionState = remember { InteractionState() } to components such as Button and Modifier.clickable(), use interactionSource = remember { MutableInteractionSource() }.Interaction.Pressed in interactionState you should instead use the extension functions on InteractionSource, such as InteractionSource.collectIsPressedAsState().ColorStop is now Pair<Float, Color>SpanStyleRange is now `AnnotatedString.Range
ParagraphStyleRange is now AnnotatedString.Range<ParagraphStyle>StringAnnotation is now AnnotatedString.Range<String>The defaultFactory for compositionLocalOf and
staticCompositionLocalOf is now required instead of
optional.
This changes removes a potential type error for non-nullable types where no default factory was provided. Previously this would provide a null reference for a non-nullable type.
For nullable types consider supplying { null } as the default
factory.
We do not recommend using locals with non-nullable types unless
a sensible default can be provided. If no sensible default exists,
the defaultFactory lambda should throw an exception. However
throwing an exception means that consumers of the local will have
an implicit dependency on it being provided that is not enforced
by the type system. (Ifbd2a)
Deprecated methods from ui modules were removed (I646f6)
Size modifiers were renamed. Modifier.width/height/size were renamed to requiredWidth/requiredHeight/requiredSize. Modifier.preferredWidth/preferredHeight/preferredSize were renamed to width/height/size. (I5b414)
Modifier.tapGestureFilter has been removed. Use Modifier.pointerInput { detectTapGestures(...) } instead. (I266ed, b/175294473)
partial consumption was removed from pointer input system. The recommended way of coordinating partial consumtion is Modifier.nestedScroll. (Ie9c9b)
Orientation has been moved to foundation package. VelocirtTracker moved from ui.gesture to ui.input.pointer. (Iff4a8, b/175294473)
imageResource and vectorResource are now extension functions
on ImageBitmap and ImageVector companions respectively.
load{Image,Vector,Font}Resource functions have been deleted. (I89130)
AnimationClockObservable and subclasses have been removed. AnimatedFloat has been removed. (Icde52, b/177457083)
Providers has been renamed to CompositionLocalProvider
ComponentActivity.setContent() was removed from compose:ui. Use the one from androidx.activity:activity-compose:1.3.0-alpha01.
viewModel() and LocalViewModelStoreOwner were removed from compose:ui. Use the ones from androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha01 (I6f36b)
Modifier.scrollable has been reworked. Now it uses Scrollable interface instead of ScrollableController class (I4f5a5, b/174485541, b/175294473)
CustomEvens support from PointerInputModifier has been removed (I02707, b/175294473)
SnapshotStateObserver is not Experimental anymore (Id2e6a)
Deleted some previously deprecated APIs (Ice5da, b/178633932)
longPressGestureFilter and doubleClickGestureFilter have been removed. use Modifier.pointerInput with helper functions e.g detectTapGestures (I2fedf, b/175294473)
Removed String.format API refactored usages in various toString methods to not leverage String.format internally. (Id1290)
Removed dp assertions (I798d2)
Removed androidx.compose.runtime:runtime-dispatch (I55feb)
Text actions now check focus automatically (I13777, b/179648629)
Removed runBlockingWithManualClock (I15cdc, b/179664814)
Scroll position in Modifier.verticalScroll()/horizontalScroll() is represented with Ints now (I81298)
FlingConfig has been renamed to FlingBehavior now allows for customization of suspend animation rather than predefined Decays. (I02b86, b/175294473)
Added a helper function that is helpful to set the same action for all ImeAction callbacks (I63447, b/179226323)
Removed SoftwareKeyboardController callback from all text fields to be replaced by a new API shortly. (Iae869, b/168778053)
FontSpan and FontWeigthStyleSpan are no longer used and removed. (Ie5b56, b/177423444)
Made the following Material API changes:
icon parameter in BottomNavigationItem to be after selected and onClick.alwaysShowLabels parameter in BottomNavigationItem to alwaysShowLabel.bodyContent parameters in a few components to just content.ButtonDefaults.buttonColors(). Please note that because the type of the parameters have not changed, this will not cause an error in your code - please ensure you are either using named parameters or update the ordering manually, otherwise your code will not work the same as previously.secondaryVariant parameter to darkColors(). This color is typically the same as secondary in dark theme, but adding for consistency and further customization.onValueChangeEnd in Slider to onValueChangeFinished and made it nullable.text parameter in Snackbar to content for consistency.contentPadding parameter to DropdownMenuItem to allow customizing the default padding and made content be an extension on RowScope.ModalDrawerLayout to ModalDrawer.BottomDrawerLayout to BottomDrawer.Bug Fixes
<animated-vector> XML as an AnimatedImageVector and animate it
with painterFor (I8ea91)February 10, 2021
androidx.compose.ui:ui-*:1.0.0-alpha12 is released. Version 1.0.0-alpha12 contains these commits.
API Changes
Modifier.focusOrder() that
accepts a FocusRequester without specifying a
custom focus order a lambda. This is useful
when we only need to specify a reference
but not a custom focus order for a composable (I4f52a, b/179180978)isFocusable has been moved to a focusable parameter in PopupProperties (Ieeea5)Modifier.pointerInput { detectDragGestures (...)} instead. Alternatively, use Modifier.draggable for one axis drags (I0ba93, b/175294473)state { 0 } composable and now promote usage like remember { mutableStateOf(0) } we are going to remove savedInstanceState { 0 } composable. You should use rememberSaveable { mutableStateOf(0) } instead and it will save and restore automatically if the type used inside the MutableState can be stored in the Bundle. If previously you were passing a custom saver object now you need to use a new overload of rememberSaveable which has stateSaver parameter. The usage will look like this: val holder = rememberSaveable(stateSaver = HolderSaver) { mutableStateOf(Holder(0)) } (Ib4c26, b/177338004)emptyContent() and (@Composable () -> Unit).orEmpty() utilities have been deprecated as they no longer have any positive performance impact or value (I0484d)snapshotFlow and withMutableSnapshot are no longer
experimental (I6a45f)view.captureToImage() without any replacement. (I7fcd2)InfiniteAnimationPolicy coroutine context
element that will be applied in infinite animations. By default no
policy is installed, except when running tests with ComposeTestRule. (I50ec4, b/151940543)The API the Compose compiler plugin targets has been refactored to use an interface instead of a concrete class. The interface also no longer uses a type parameter.
This is an internal change that should not effect source code compatibility but is a binary breaking change. (I3b922, b/169406779)
Remove unintentionally public StringBuilder.deleteAt function (Id6ed9)
Bug Fixes
January 28, 2021
androidx.compose.ui:ui-*:1.0.0-alpha11 is released. Version 1.0.0-alpha11 contains these commits.
API Changes
data class from the following classes:
Bug Fixes
Changes to factory functions for Font/FontFamily/Typeface
Introduced ComposeContentTestRule, which extends
ComposeTestRule and defines setContent, which has been removed from
ComposeTestRule. Added a factory method createEmptyComposeRule()
that returns a ComposeTestRule and does not launch an Activity for
you. Use this when you want to launch your Activity during your test,
e.g. using ActivityScenario.launch (I9d782, b/174472899)
animateAsState is now animateFooAsState, where Foo is the type of the variable being animated. e.g. Float, Dp, Offset, etc (Ie7e25)
Content description parameter has been added to the Image and Icon. It is used to provide description to the accessibility services (I2ac4c)
Remove displaySize as it should be avoided. Typically it is better to use size of onRoot() or window size at least. (I62db4)
OnSizeChanged was reporting the size of the layout's contents. It now reports the size at its position within the modifier chain. (I36b78, b/177562900)
The emit() API and all overloads have been deprecated and renamed to ComposeNode. The APIs are identical, just a different name in order to follow the naming conventions of Compose (I4137b)
TextFieldValue accepts AnnotatedString. However this is an API only change and multi-style text editing is not implemented yet.
initial from EditingBuffer constructor parameters. (I326d5)invalidate and compositionReference() are now deprecated in favor of currentRecomposeScope and rememberCompositionReference respectively. (I583a8)
AnnotatedString is changed to extend from kotlin.CharSequence. Therefore length and subSequence are now instance functions, and extension functions are removed. (Iaf429)
RememberObserver replaces CompositionLifecycleObserver and CompositionLifecycleObserver is now deprecated.
RememberObserver is a replacement for
CompositionLifecycleObserver with modified semantics and
renamed methods. Changing to the new API can be done mechanically
for objects that are only remembered once which is, and continues to
be, the recommended practice. However, if a reference was
remembered more than once in a composition onRemembered is called
for each reference where onEnter is only called once. onEnter
was called multiple time if the object was used in subcompositions,
such as WithConstraints and Scaffold making the single
onEnter call guarantee unreliable and it was removed for
RememberObserver.
RememberObserver adds onAbandoned which is called if the
RememberObserver instance is returned from the callback passed
to remember but was not remembered in the composition state
and, therefore, will never have onRemembered called. This can
occur if an exception terminates composition before completing or
the composition is discarded because the state is was producing
a composition for is no longer current or otherwise is no longer
needed. If the instance of RememberObserver following the single
reference recommendation above is tracking an external resource
both onForgotten and onAbandoned each indicate that the
resource is no longer needed. If the object is tracking work
started or resources allocated in onRemembered, onAbandoned
can be ignored as it will not be called if onRemembered is
called. (I02c36)
Deprecated arithmetic operations between 2 or more TextUnits. Deprecated TextUnit.Sp and TextUnit.Em functions in preference to the extension functions such as Int.sp and Int.em. (I48369)
Resources in libraries with no explicitly declared public resources (ex. via public.xml) are now private by default. (Ia1dcc, b/170882230)
ScrollableColumn/Row were deprecated. Using ScrollableColumn is less efficient compared to LazyColumn when you have a large scrolling content because with LazyColumn we can only compose/measure/draw visible elements. To prevent users from going the inefficient way we decided to deprecate ScrollableColumn and ScrollableRow and promote usages of LazyColumn and LazyRow instead. Users can still decide they don't need the lazy behaviour and use the modifiers directly like this: Column(Modifier.verticalScroll(rememberScrollState())) (Ib976b, b/170468083)
New items(count: Int) factory method for scope of LazyColumn/LazyRow/LazyVerticalGrid.
items(items: List) and itemsIndexed(items: List) are now extension functions so you have to manually import them when used.
New extension overloads for Arrays: items(items: Array) and itemsIndexed(Array) (I803fc, b/175562574)
Please use ImeAction.None instead of ImeAction.NoAction
Leverage TestCoroutineDispatcher in testing (I532b6)
Renamed TextInputService.onStateUpdated as updateState (Id4853)
TransitionDefinition-based Transition has been deprecated (I0ac57)
TextUnitType.Inherit is removed. Please use TextUnitType.Unspecified instead. (I9ff64)
January 13, 2021
androidx.compose.ui:ui-*:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits.
Breaking Change
Restructuring of the internal compiler
API allows batching changes to the nodes generated
as a result of composition into the "apply changes"
phase of composition, after all @Composable functions
have completed.
This is a behavioral breaking
change that might affect application code as
nodes are no longer available from internal and
experimental APIs until after changes have been
applied. This can usually be worked around by
surrounding code with such dependencies in a
SideEffect composable to defer execution of the
code until after the nodes have been created and
initialized. (I018da)
API Changes
@ExperimentalTesting to @ExperimentalTestApi to be
consistent with similar experimental api annotations (Ia4502, b/171464963)Expand [Abstract]ComposeView APIs to allow recycling Compose-based views, disposing their composition to recreate again later. Add APIs for installing and discovering window-scoped Recomposers and CompositionReferences for creating child compositions.
Add ViewCompositionStrategy for configuring the composition disposal strategy of [Abstract]ComposeViews; default behavior is dispose on window detach. (I860ab)
Removed Any.identityHashCode() public api (I025d7)
Removed toStringAsFixed API in favor of using String.format instead directly. (Iaba6b)
Add Toggle to foundation Strings.kt (I4a5b7, b/172366489)
Moved nativeClass to ui module and made it internal. Updated usages of nativeClass in equals implementations to use 'is MyClass' instead. (I4f734)
Modifier.focus() and Modifier.focusRequester() are deprecated. Use Modifier.focusModifier() and Modifier.focusReference() instead. (I75a48, b/175160751, b/175160532, b/175077829)
Introduced SelectionRegistrar.notifySelectableChange to notify Selectable updates to SelectionManager. (I6ff30, b/173215242)
Introduced Outline.bounds property to obtain the bounding rect for various outline implementations. (I16e74, b/175093504)
Deprecated TestUiDispatcher. Use Dispatchers.Main instead (Ic171f, b/175385255)
ImeOptions and KeyboardOptions are no more a data class (I3c898, b/168684531)
VisualTransformation API Changes
Renamed Position to DpOffset and removed getDistance() (Ib2dfd)
Changed fun Dp.isFinite() to a val Dp.isFinite (I50e00)
Bug Fixes
animate() is now replaced with animateAsState(),
which returns a State<T> instead of T. This allows better
performance, as the invalidation scope can be narrowed down
to where the State value is read. (Ib179e)Animatable that ensures mutual exclusiveness
among its animations.
December 16, 2020
androidx.compose.ui:ui-*:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits.
API Changes
The Applier interface has changed to simplify
building trees bottom-up instead of top-down.
The insert() method has been renamed to insertTopDown().
A new method, insertBottomUp(), was added.
An applier either inserts nodes into the tree it is editing
using insertTopDown() or insertBottomUp() depending on
which performs better.
Some trees, such as LayoutNode and View, are much more
efficient to build bottom-up than top-down. Prior to this change,
a stack of inserts was required to implement bottom-up which
needed to be copied to every applier which needed bottom-up
construction for performance. With this change an Applier
overrides insertBottomUp() to build a tree bottom-up and
insertTopDown() to build the tree top-down. (Icbdc2)
Added dismissOnBackPress and dismissOnClickOutside properties to AndroidDialogProperties. These allow configuring when the dialog's onDismissRequest lambda will be invoked. (If5e17)
Added painterResource API to handle opaquely loading Painter objects from either rasterized asset formats (like PNGs) or VectorDrawables. Consumers no longer have to determine the type of asset in advance and can call this method to get a Painter object to use in Image composables or painter modifiers. (I2c703, b/173818471)
Added Modifier.clearAndSetSemantics to clear descendants' semantics and set new ones. (I277ca)
Moved ContentDrawScope to ui-graphics module to be with DrawScope. (Iee043, b/173832789)
Introduced PathEffect graphics API to provide different patterns to stroked shapes. Deprecated usage of NativePathEffect in favor of expect/actual implementation of PathEffect. (I5e976, b/171072166)
Added IdlingResource interfaces to Compose, as a Compose supported variant of Espresso's idling resources. They can be registered and unregistered through the ComposeTestRule (I433f3)
Removed global (un)registration of ComposeIdlingResource and global (un)registration of clocks into ComposeIdlingResource (I32660)
Bug Fixes
Removed SlotTable, SlotReader and SlotWriter from the public API. These were marked as InternalComposeAPI previously. Now they are internal to the compose module.
CompositionData and CompositionGroup were added as a replacement for the ui-tooling API to use to extract composition information. These are public but are not intended for use outside the ui-tooling API as they provide the raw information the ui-tooling API interprets (I31a9c)
Refactored ShaderBrush to lazily create a shader instance when sizing information of the drawing environment is available. This is useful to define gradients that occupy the full drawing bounds of a composable at composition time, without having to implement custom DrawModifier implementations.
Deprecated gradient function constructor APIs in favor of factory methods on a Gradient object. (I511fc, b/173066799)
Deprecate LazyColumnFor, LazyRowFor, LazyColumnForIndexed and LazyRowForIndexed. Use LazyColumn and LazyRow instead (I5b48c)
Deprecated BuildCompat.isAtLeastR (Idb37e)
Added buildAnnotatedString factory function in order to build an AnnotatedString. Deprecated annotatedString builder function. (Idfe0b)
Removed extension methods on Float and Double to convert values to radians. Moved to be a private function within the implementation PathParser which was the only place where it was used (I25f52)
December 2, 2020
androidx.compose.ui:ui-*:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits.
API Changes
<T> was removed from SubcomposeLayout declaration. You can use it without specifying a type now. (Ib60c8)Modifier.drawOpacity to Modifier.alphaModifier.drawShadow to Modifier.shadow (I264ca, b/173208140)pivotFractionX and pivotFractionY as
component1 and component2 (If43c4, b/173586560)children as the name for their trailing lambda to content, according to the lint check and guidance. (Iec48e)Modifier.drawLayer() overload. It takes a lambda block on a new GraphicsLayerScope where you define the layer parameters in a way which allows to skip recomposition and relayout when the state change happens. DrawLayerModifier is now internal in preparation to migrating its logic into placeable.placeWithLayer() method of LayoutModifier (I15e9f, b/173030831)Ambient as their suffix, and replaced them with new properties prefixed with Ambient, following other Ambients and Compose API guidelines. (I33440)androidx.compose.ui.text.Typeface to
androidx.compose.ui.text.font.Typeface (Ic2b81)id was renamed to layoutId for LayoutIdParentData. Measurable.id was renamed to Measurable.layoutId. (Iadbcb, b/172449643)Add coroutine-based scrolling APIs:
Adds LazyListState.snapToItem and LazyListState.smoothScrollBy, as well as lower-level APIs for scroll control. These APIs provide a suspend interface to control scrolling that waits until the scroll is finished before returning. (Ie5642)
Modifier.focusable has need added in foundation. Use this to add focusable behavior to a component, with correct semantics and accessibility. (I41eb9, b/152525426, b/162865824)
Provide default implementations of methods and properties in
AnimationClockTestRule that can be delegated to its clock (I7ea3d, b/173399709)
AndroidComposeTestRule can now accept custom activity launchers (Ib8288, b/153623653, b/154135019)
TextLayoutResult.getLineVisibleEnd is deprecated. As a replacement TextLayoutResult.getLineEnd now has a new parameter visibleEnd. (I73282)
Updated TextFieldValue API
Support TtsAnnotation for text to speech engine. (I54cc6)
New APIs for running animations in coroutines (Ied662)
Bug Fixes
typeface function i.e. typeface(Typeface.DEFAULT).
Also renamed typefaceFromFontFamily() to typeface() (I52ab7)November 11, 2020
androidx.compose.ui:ui-*:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits.
API Changes
onAllNodesWithSubstring finder (I81dd7, b/171462889)Bug Fixes
relativePaddingFrom was renamed to paddingFrom. The paddingFromBaseline modifier was added, as convenience for specifying distances from layout bounds to text baselines. (I0440a, b/170633813)zIndex values when multiple Modifier.zIndex() applied. Previously the first one was winning. (Ic514c, b/170623936)External Contribution
October 28, 2020
androidx.compose.ui:ui-*:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits.
API Changes
PointerInputFilter.onPointerEvent(...) given that the only value that should be able to be changed in pointer events is consumption data.
Instead of returning data from PointerInputFilter.onPointerEvent(...), now you can just mutate the consumption data of the PointerEvents passed in. (I6acd0)Bug Fixes
ACTION_DOWN (I94c5a, b/170320973)External Contribution
AnnotatedString.capitalize and AnnotatedString.decapitalize (I4aa7f)October 14, 2020
androidx.compose.ui:ui-*:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits.
API Changes
Consumption data is now mutable. Also calls to extension functions that do consumption now no longer return a new PointerInputChange, but instead mutate the provided PointerInputChange.
This is the first step in a 2 step process to
make PointerEvent data mutable such that other
pointer data cannot be edited by user code. The
second step will be to remove the
List<PointerInputChange> return type from
PointerInputFilter.onPointerEvent(...). (Id067e)
Disable Selection in Text, and a Demo. (Ie7e97)
Made onGloballyPositioned an inline function (I15830)
OnPositionedModifier is renamed to OnGloballyPositionedModifier and onPositioned() is renamed to onGloballyPositioned(). (I587e8, b/169083903)
The hasPendingMeasureOrLayout property was added to Owner, telling whether the Owner has any pending layout work. (I3d9f8, b/169038599)
Added API to programmatically clear focus (Ie1dc2, b/161487952)
Removed PointerInputFilter.onPointerInput(...).
PointerInputFilter.onPointerEvent(...) should be used in its place. (I6f04a)
Changes to Size
As part of the standardization of sentinel values for inline classes, rename Color.Unset to Color.Unspecified for consistency with other inline classes (I97611, b/169797763)
TextOverflow.None is introduced. When overflow is None, Text won't handle overflow anymore, and it will report its actual size to LayoutNode. (I175c9, b/158830170)
The scope parameter within AnnotatedString.Builder.addStringAnnotation is renamed to tag for API consistency. (I7c8cb)
Bug Fixes
October 1, 2020
androidx.compose.ui:ui-*:1.0.0-alpha04 is released. Version 1.0.0-alpha04 contains these commits.
API Changes
Updated implementation to create a dedicated DrawCacheModifier implementation instead of adding optional properties on DrawModifier.
Updated documentation for various methods (Ibd166)
Make TextRange inline to avoid object creation. (Id034b)
PlacementScope#parentWidth and PlacementScope#parentLayoutDirection can no longer be read from the placement block of a custom layout. (Icc1ae, b/168295623)
add AccessibilityScrollState to semantics properties. (Ifeda9)
Introduced Modifier.drawWithCache to support creating a drawing object that conditionally recreates dependencies that depend on size/state information (I376dc)
ParagraphConstraints is removed. Width is directly passed to Paragraph now. (Ica712)
Bug Fixes
September 16, 2020
androidx.compose.ui:ui-*:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits.
API Changes
onInvalidate() from Owner -- OwnedLayer
handles invalidation. (Ica72b, b/162061312)Removed operator methods on Size API that consume Offset parameters. The result of these operations is unclear and the type of result is unexpected for these. Ex. should size - offset return an offset or a size result with the difference?
Also removed deprecated methods on Size class. (Iec902, b/166514214)
Bug Fixes
createAndroidComposeRule and AndroidInputDispatcher from
androidx.ui.test.android to androidx.ui.test (Idef08, b/164060572)September 2, 2020
androidx.compose.ui:ui-*:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits.
API Changes
Fixed issue where Rect function constructor with Offset and radius would create the Rect in the order of left, right, top, bottom instead of left, top, right, bottom.
Removed deprecated companion methods on Rect in favor of function constructors.
Added tests to verify methods in Rect.kt (I08460, b/165822356)
Bug Fixes
The calling convention for composable functions has changed. This is a binary breaking change. All libraries must be recompiled to work with this version of the compose compiler plugin.
This change does not create a source level breaking change as the only APIs that have changed are compiler APIs that have an explicit opt in. (I7afd2, b/158123185)
Fixed crash that could occur when dispatch to a PointerInputFilter could cause the PointerInputFilter to be synchronously removed. (I58f25)
August 26, 2020
androidx.compose.ui:ui-*:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits.
August 19, 2020
androidx.compose.ui:ui-*:0.1.0-dev17 is released. Version 0.1.0-dev17 contains these commits.
API Changes
emitView was deprecated. Use AndroidView instead if possible for emitting Views inside Compose. Note that composing Views and ViewGroups directly will not be supported in the future unless these are leaves in the composition tree, case when this can be achieved using AndroidView. (I29b1e, b/163871221)FocusState2 is deprecated and replaced by FocusState (Ia8b79, b/160822876, b/160923332)Changed Vector classes to no longer be data classes as the same object instance is used for composition.
Added mutableStateOf flag for VectorPainter to conditionally re-draw if contents of the vector change.
Refactored VectorComponent instance to be part of VectorPainter as it is re-used across compositions.
Updated GroupComponent and PathComponent to have their name fields be mutable (Ieae45, b/151378808)
Removed onChildPositioned and OnChildPositionedModifier.
Developers should use onPositioned and OnPositionedModifier
on the child layout instead. (I4522e, b/162109766)
Offset has become an inline class (Iaec70)
Added a modifier param to SelectionContainer (I4aada, b/161487952)
Removed deprecated FocusModifier (I0b4ba, b/160922116, b/160821157, b/162441435, b/160822875, b/160921940)
Added mergePolicy lambda to SemanticsPropertyKey. This can be
used to define a custom policy for mergeAllDescendants semantics
merging. The default policy is to use the parent value if already
present, otherwise the child value. (Iaf6c4, b/161979921)
Constraints is now an inline class (I88736)
Added FocusManager that moves common focus logic out of AndroidComposeView (I528ef, b/161487952, b/162206799)
Updated PointerEventPass names for Alpha release. (Ifda6f)
IntOffset is now an inline class (Iac0bf)
IntSize is now an inline class (I2bf42)
PlacementScope.placeAbsolute() was renamed to PlacementScope.place(), and the previous PlacementScope.place() was renamed to PlacementScope.placeRelative(). As a result, the PlacementScope.place() method will not automatically mirror the position in right-to-left contexts anymore. If this is desired, use PlacementScope.placeRelative() instead. (I873ac, b/162916675)
AlertDialog now uses FlowRow for buttons (I00ec1, b/161809319, b/143682374)
Made some test utilities non public because they are not where they belong. Will be made public in the future. (I32ab1)
Refactored organization of pointer input code. (Ie3f45)
Deprecated PxBounds in favor of Rect. Updated all usages of PxBounds with rect and added proper deprecate/replace with annotations to assist with the migration. (I37038, b/162627058)
Removed Deprecated KeyEvent2. Use KeyEvent instead. (Ied2d0, b/162097587)
KeyEvent has a unicode property that can be used to get the unicode character generated by the specified key and meta key state combination (If3afc)
Made the DelayUp custom event and related classes an opt in API as it is very likely going to be changed. (I56d6f)
Removed 2 PointerEventPasses that are no longer needed. (I3dd9d)
Add parameter color, shadow and TextDecoration to Paragraph.paint This function is useful to avoid unnecessary Paragraph recreation. (I81689)
Bug Fixes
Removed deprecated FrameManager calls.
Internal compose APIs have been changed to reduce the amount of
overhead to track state objects such as mutableStateof() (I80ba6)
VerticalScroller and HorizontalScroller have been removed. Use ScrollableColumn/Row instead. Modifier.drawBackground has been removed. Use Modifier.background (I73b0d, b/163019183)
Crash when something which saves the state was used inside the for loop is fixed. Now having the same key in savedInstanceState() is allowed, api of UiSavedStateRegistry is now adjusted to this new requirement (I4ab76, b/160042650, b/156853976, b/159026663, b/154920561)
The state { ... } composable is now deprecated in favor of
explicit calls to remember { mutableStateOf(...) } for clarity.
This reduces the overall API surface and number of concepts for state
management, and matches the by mutableStateOf() pattern for class
property delegation. (Ia5727)
Renamed RRect to RoundRect to better fit compose naming patterns Created similar function constructors to RRect and deprecated RRect function constructors (I5d325)
August 5, 2020
androidx.compose.ui:ui-*:0.1.0-dev16 is released. Version 0.1.0-dev16 contains these commits.
API Changes
Modifier.padding().background() + anotherModifier, which breaks the chain and harder to read (Iedd58, b/161529964)Row and Column are now inline function significantly
reducing the overhead of using them. (I75c10)SemanticsNode.positionInRoot to get the position of a
SemanticsNode relative to the root of the Compose hierarchy (Icdf26, b/161336532)Bug Fixes
SemanticsNodeInteraction.performPartialGesture. Use
SemanticsNodeInteraction.performGesture instead. (Id9b62)LazyColumnItems was renamed to LazyColumnFor. LazyRowItems was renamed to LazyRowFor (I84f84)foundation.shape.corner package was flattened to foundation.share (I46491, b/161887429)AndroidComposeTestRule to createAndroidComposeRule. (I70aaf)TextLayoutResult. (Id7e04)FilledTextField was renamed to TextField and foundational TextField was renamed to BaseTextField to make simplest desired API easy to discover and use (Ia6242, b/155482676)July 22, 2020
androidx.compose.ui:ui-*:0.1.0-dev15 is released. Version 0.1.0-dev15 contains these commits.
0.1.0-dev15 version of Compose, you will need to update your dependencies
according to the new code snippets shown above in Declaring dependencies.API Changes
semantics { hidden() }. (Ic1afd, b/145951226, b/145955412)Added copy methods to various inline class types including:
TransformOrigin
Deprecated Size.copy companion object method favor of instance copy method (Ife290, b/159905651)
Popups, Dialogs and Menus are now inheriting the contextual MaterialTheme (Ia3665, b/156527485)
TextDirection is renamed as ResolvedTextDirection (I3ff38)
Removed layout direction parameter from the measure block of the Layout() function. Layout direction is however available inside the callback through the measure scope object (Ic7d9d)
Refactor SelectionHandles for reusing. (I420e0)
Clickable was removed. Use Modifier.clickable (I84bdf)
TestTag and Semantics have been deleted. Use Modifier.testTag and Modifier.semantics instead (I15ff0, b/158841414)
Prior to this change, the compose compiler plugin would non-trivially intercept calls to constructors inside of a @Composable function if there was an (I5205a, b/158123804)
Modifier.tag was renamed to Modifier.layoutId, to avoid confusion with Modifier.testTag. (I995f0)
Alignment line Int positions returned from Placeable#get(AlignmentLine) are now non-null. If the queried alignment line is missing, AlignmentLine.Unspecified will be returned. (I896c5, b/158134875)
The AndroidView composable was added a modifier parameter. (I48a88, b/158746303)
Semantics() is deprecated. Use Modifier.semantics() instead. (I72407, b/158841414)
Add viewModel() composable which allows to create or get already created ViewModel similarly to how it works in Activity or Fragment (I5fdd1)
Replaced usage of IntPx with Int. Replaced IntPxPosition with IntOffset. Replaced IntPxSize with IntSize. (Ib7b44)
In order to consolidate the number of classes used to represent sizing information, standardize on usage of the Size class instead of PxSize. This provides the benefits of an inline class to leverage a long to pack 2 float values to represent width and height represented as floats. (Ic0191)
In order to consolidate the number of classes used to represent positioning information, standardize on usage of the Offset class instead of PxPosition. This provides the benefits of an inline class to leverage a long to pack 2 float values to represent x and y offsets represented as floats. (I3ad98)
Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters. Deleted Px class in its entirety (I3ff33)
Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters (I086f4)
Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters (Id3434)
Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters (I97a5a)
TestTag is now deprecated. Use Modifier.testTag instead. (If5110, b/157173105)
The default, no-op, implementation of ParentDataModifier#modifyParentData has been removed - it was equivalent to not implementing the interface in the first place. (I0deaa)
Previously deprecated ScaleFit as removed. Use ContentScale instead. (Ifbc5b)
Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters (I19d02)
Added the DropdownMenu component in ui-material, a Material Design menu implementation. (I9bb3d)
Removed deprecated LayoutTag(), please use Modifier.tag() instead. Removed deprecated Modifier.matchParent(), please use Modifier.matchParentSize() instead. (If8044)
Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters (I57bff)
Modifier.semantics has been undeprecated to allow usages for high level components. (I4cfdc)
Consolidated CanvasScope implementations so there is now just DrawScope and ContentDrawScope Renamed CanvasScope to DrawScope. Updated DrawScope to implement Density interface and provide LayoutDirection Deleted DrawScope subclass in ContentDrawScope Painter and PainterModifier have been updated to no longer maintain an RTL property themselves as DrawScope provides this already without manually providing it (I1798e)
DoubleTapGestureFilter now disambiguates SingleTapGestureFilter across the tree. (If92b1)
Updated Alignment API and added support for absolute alignment (which does not auto-mirror in Rtl context) (I38cd3)
DrawLayer modifiers api has been changed: outlineShape renamed to shape and has the RectangleShape default value and now non-nullable; clipToOutline renamed to clip; clipToBounds removed as it is the same as clip == true with RectangleShape (I7ef11, b/155075735)
Updated higher level compose APIs that expose a Canvas to expose CanvasScope instead. This removes the need for consumers to maintain their own Paint objects. For consumers that still require access to a Canvas they can use the drawCanvas extension method which provides a callback to issue drawing commands with the underlying Canvas. (I80afd)
WithConstraints trailing lambda API has been changed. Now instead of two params it has a receiver scope which in addition to constraints and layoutDirection provides minWidth, maxWidth, minHeight and maxHeight properties in Dp (I91b9a, b/149979702)
Renamed LayoutModifier2 to LayoutModifier. (Id29f3)
Removed deprecated LayoutModifier interface. (I2a9d6)
Intrinsic measurements functions in Layout and LayoutModifier2 have an IntrinsicMeasureScope receiver now which provides intrinsics query API with implicitly propagated layout direction. (Id9945)
Layout and LayoutModifier children can be measured with a different layout direction. (Ibd731)
New Modifier.zIndex() is added to control the drawing order of the children within the same parent layout. elevation property on DrawLayerModifier is renamed to shadowElevation and doesn't control the drawing order anymore. The params order fo DrawShadow is changed: elevation is now the first one and the shape is the second one with a RectangleShape default. (I20150, b/152417501)
Removed onSizeChange and onPositionChange in Owner. (I5c718)
Added Constraints2, a copy of Constraints that does only supports Int connstraints values rather than IntPx. IntPx will be removed and all integer constraints will be assumed to be pixels like Android.
Made Alignment instantiable with arbitrary values. Added 1D Alignments. (Ia0c05)
alignToSiblings now accepts a Measured instead of Placeable. (I5788d)
Rtl support for draw modifiers. (I0aaf9)
Released API for inflating Android Views from XML. See ViewInCompose demo for more details. (I42916)
Improve DrawModifier API:
Added positionInParent and boundsInParent for LayoutCoordinates. (Icacdd, b/152735784)
DrawLayerModifier and drawLayer() now default clipToBounds and clipToOutline to false. (I0eb8b, b/152810850)
Renamed LayoutResult to MeasureResult. (Id8c68)
Added LayoutModifier2, a new API for defining layout modifiers; deprecated LayoutModifier (If32ac)
Replaced Modifier plus operator with factory extension functions (I225e4)
Added translationX/Y properties to support offseting the display list of drawing commands for a given Layer. This is useful to move content in response to animations or touch events. (I8641c)
Added pivotX, pivotY parameters to Layer APIs to support rotation and scaling around a particular point on a layer (Icf7c3)
Add OnPositionedModifier and OnChildPositionedModifier to replace OnPositioned and OnChildPositioned composable functions. (I2ec8f)
Added LayerModifier, a modifier that allows adding a RenderNode for a Layout. It allows setting clipping, opacity, rotation, scaling, and shadows. This will replace RepaintBoundary. (I7100d, b/150774014)
Made the layout direction be propagated from parent layout node to children. Added layout direction modifier. (I3d955)
Stack component supports right-to-left directionality (Ic9e00)
Initial support for Rtl in Compose layout (Ia5519)
Density and DensityScope were merged into one interface. Instead of ambientDensity() you can now use DensityAmbient.current. Instead of withDensity(density) just with(density) (I11cb1)
Changed LayoutCoordinates to make providedAlignmentLines a Set instead of a Map and have LayoutCoordinates implement the get() operator instead for retrieving a value. This makes it easier for modifiers to modify one or more value of the set without creating a new collection for each modifier. (I0245a)
LayoutCoordinates no longer has a position property. The position property does not make sense when considering LayoutModifiers, rotation, or scaling. Instead, developers should use parentCoordinates and childToLocal() to calculate the transform from one LayoutCoordinate to another.
LayoutCoordinates uses IntPxSize for the size property instead of PxSize. Layouts use integer pixel sizes for layouts, so all layout sizes should use integers and not floating point values. (I9367b)
Improvements to the API surface of Constraints (I0fd15)
Created CanvasScope API that wraps a Canvas object to expose a stateless, declarative drawing API surface. Transformations are contained within their own receiver scope and sizing information is also scoped to corresponding inset bounds. It does not require a consumer to maintain its own Paint state object for configuring drawing operations.
Removed unused MaskFilter API as it has limited usage and is not optimized for hardware acceleration in most use cases (I54f76)
RectangleShape moved from androidx.ui.foundation.shape.* to androidx.ui.graphics.* (Ia74d5, b/154507984)
Replaced all nullable Color uses in API with non-nullable and use Color.Unset instead of null (Iabaa7)
Introduce additional optional rect parameter to ImagePainter to support drawing a subsection of underlying ImageAsset (I0ea9e)
Added Unset Color to represent an unset value without boxing Colors. (If901a)
Added Canvas.rotate and Canvas.scale extension methods to consume optional pivot coordinates for transformations. These default to the top left corner of the current canvas translation.
Also moved Canvas.rotateRad to be an extension method for consistency (Ibaca6)
Created PixelMap API to support querying pixel information from an ImageAsset. (I69ad6)
Renamed toFrameworkRect/toFrameworkRectF to toAndroidRect/toAndroidRectF to match naming convention for object conversions between compose and the Android framework APIs they are built on top of. Also updated docs on these APIs (I86337)
Added VectorPainter API to replace existing subcomposition API for vector graphics. Result of subcomposition is a VectorPainter object instead of a DrawModifier. Deprecated previous DrawVector composables in favor of VectorPainter.
Renamed Image(Painter) API to PaintBox(Painter) Created Vector composable that behaves like the Image composable except with a VectorAsset instead of an ImageAsset (I9af9a, b/149030271)
Renamed Image to ImageAsset to better differentiate the difference between the Image data and the upcoming Image composable used to participate in layout and draw content. _Body:Created extension method on android.graphics.Bitmap, Bitmap.asImageAsset(), to create an instance of an ImageAsset useful for combining traditional Android application development with the compose framework (Id5bbd)
Added TextDirection.Content (I48f36)
Added TextDecoration.plus operator (I0ad1a)
Force is removed from TextDirectionAlgorithm enum values (Icc944)
TextDirectionAlgorithm is renamed as TextDirection (I75ce8)
Implements LongPressAndDrag for TextField Selection. (I17919)
Added AnnotatedString.getStringAnnotations that returns all annotations within the range. (I1fa00)
Changed the package name for Locale and LocaleList from androidx.ui.text to androidx.ui.intl (I8132c)
TextField's cursor has a blinking animation (Id10a7)
API change: AnnotatedString(builder: Builder) is renamed to annotatedString(builder: Builder). (Ia6377)
API change: AnnotatedString.Item is renamed to AnnotatedString.Range. (I2d44d)
Rename AnnotatedString.Builder.addAnnotationString to addStringAnnotation. (I5059e)
Now it is possible to hide/show software keyboard by using SoftwareKeyboardController which is delivered by onTextInputStarted callback (I8dc44, b/151860051)
Added plus operator for (Text/Paragraph/Span)Style which delegates to merge() function. (Ia1add)
FontWeight.lerp does not snap anymore. It is still a data class. (I521c2)
FontWeight constructor is now public, it is not data class anymore. (Id6b1f)
Add getLineStart, getLineEnd, getEllipsisOffset and getEllipsisCount to TextLayoutResult (Ibc801)
ui-text module is renamed as ui-text-core (I57dec)
Removed unused Size class as there is a duplicate Size class in the ui-geometry module that is being consumed. (I1b602)
Added AdapterList, a scrolling list component that only composes and lays out the visible items. Currently known issues include that it is vertical-only and does not fully handle all cases of changes to its children. (Ib351b)
Add paddings, border, shape and background param to Box (I05027, b/148147281)
Bug Fixes
runOnIdleCompose renamed to runOnIdle (I83607)Refactored PainterModifier to no longer provide scaling based on the given constraints and ContentScale parameter. Implementations of Painter are to scale their drawing content themselves based on the given size of the DrawScope they are drawing into.
Fixed issue where VectorPainter's cache bitmap was sized to its default size instead of the given size to draw into.
Updated ImagePainter to scale its content instead of relying on PainterModifier to do so on its behalf. (I6ba90)
add top-level withFrameNanos function for animation timing (Ie34c5)
@Untracked annotation has been deprecated. Replace with @ComposableContract(tracked=false) (Id211e)
androidx.ui.foundation.TextFieldValue and androidx.ui.input.EditorValue is deprecated. TextField, FilledTextField and CoreTextField composables that uses that type is also deprecated. Please use androidx.ui.input.TextFieldValue instead (I4066d, b/155211005)
Fixed issue where pointer input dispatch would cause a crash if PointerInputFilters were removed via subcomposition during disptach. This is now fixed. (I1f48b, b/157998762)
Fixed issue where pointer input dispatch would cause a crash if PointerInputFilters were removed via subcomposition during disptach. This is now fixed. (Iab398, b/157998762)
Refactored Radius class to be an inline class. Removed companion creation methods in favor of function constructor with default parameter to have the radius along the y-axis match that of the mandatory x-axis radius parameter.
Updated DrawScope.drawRoundRect to consume a single Radius parameter instead of 2 separate float values for the radius along the x and y axis (I46d1b)
The Recompose composable is no longer a useful abstraction. Most recomposition should happen as a result of MutableState assignments. For anything beyond that, it is recommended that you use the invalidate function to trigger a recomposition of the current scope. (Ifc992)
Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters (Iede0b)
Changes the code generation strategy of Compose’s compiler. Prior to the change, the compose compiler would transform calls to composable functions. With this change, we now transform the body of a composable function and leave the callsite unaltered (mostly).
This means that most of the logic communicating with the compose runtime happens at the start of the function body, instead of at the callsite.
This should be a source-compatible change for all usage of compose. Most users of compose should not have to update any code as a result of this change.
In order to support this work, the JVM signature of all composable functions has changed. A Composable function accepting a single parameter is transformed into a function accepting 3 parameters, the additional parameters are the Composer, a ‘key’ integer. a bitmask integer used to propagate metadata through calls.
Compose now also transforms default arguments to a composable function. It does this without introducing an additional synthetic default overload of the function itself, so this change will result in fewer functions being defined.
Known intentional behavioral changes resulting from this:
This work included some optimizations: 1. The result of comparisons of parameters are propagated through the call graph to other composable functions. This will result in fewer comparisons at runtime, reduces the slot table size, as well as more skipping of composable functions that were previously not skipped 2. Paremeters which are determined to be “static” at compile time are no longer compared or stored in the runtime. This reduces the number of comparisons and reduces slot table size. 3. Control flow structure of the body of functions is used to minimize the number of groups that are generated. This reduces slot table size and results in less work for the runtime 4. Unused dispatch and receiver parameters to functions are not included in determining skippability of the function if they are not used inside of the body of the function.
Most breaking changes were for APIs that the compiler targets directly, and typical use of compose will not be affected:
1. Composer::startExpr was removed
2. Composer::endExpr was removed
3. Composer::call was deprecated
4. The non-varargs overloads of key have been removed. Use the vararg version going forward.
5. The Pivotal annotation was deprecated. Use key as a replacement.
6. ScopeUpdateScope::updateScope was changed to expect a Function3 instead of Function1
7. restartableFunction and restartableFunctionN were updated to include additional compile time parameters
(I60756, b/143464846)
Removed deprecated LayoutAlign modifiers. (I10877)
Removed RepaintBoundary in favor of DrawLayerModifier (I00aa4)
Button, FloatingActionButton and Clickable now have a separate enabled param. Some of the params on Button were renamed or reordered. (I54b5a)
Replaced ButtonStyle with distinct functions and removed text (string) overload. See updated samples for usage information. (If63ab, b/146478620, b/146482131)
Breaking changes to the ambients API. See log and Ambient<T> documentation for details (I4c7ee, b/143769776)
Changed the behavior of default TextDirection to be determined by LayoutDirection. i.e. If LayoutDirection is RTL, default TextDirection will be RTL. Previously it was TextDirection.ContentOrLtr/Rtl (I4e803)
Bug fix: When font weight and font style are nested on an AnnotatedString, text is not rendered correctly. (I77a9d)
Adds commonly used parameters to Text(). If you are currently creating a local text style to pass a small number of these parameters, such as Text(style = TextStyle(textAlign = TextAlign.Center)), you can now just provide the parameters directly: Text(textAlign = TextAlign.Center) (I82768)
ui-android-text module is renamed as ui-text-android (I68cbe)
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-07-15 UTC.