Posted by Jolanda Verhoef – Developer Relations Engineer
At present, as a part of the Compose April ‘25 Invoice of Supplies, we’re releasing model 1.8 of Jetpack Compose, Android’s fashionable, native UI toolkit, utilized by many builders. This launch incorporates new options like autofill, numerous textual content enhancements, visibility monitoring, and new methods to animate a composable’s dimension and placement. It additionally stabilizes many experimental APIs and fixes various bugs.
To make use of as we speak’s launch, improve your Compose BOM model to 2025.04.01 :
implementation(platform("androidx.compose:compose-bom:2025.04.01"))
Word: If you’re not utilizing the Invoice of Supplies, ensure that to improve Compose Basis and Compose UI on the identical time. In any other case, autofill is not going to work appropriately.
Autofill
Autofill is a service that simplifies information entry. It allows customers to fill out varieties, login screens, and checkout processes with out manually typing in each element. Now, you’ll be able to combine this performance into your Compose functions.
Establishing Autofill in your Compose textual content fields is simple:
TextField( state = rememberTextFieldState(), modifier = Modifier.semantics { contentType = ContentType.Username } )
For full particulars on how you can implement autofill in your software, see the Autofill in Compose documentation.
Textual content
When inserting textual content inside a container, now you can use the autoSize parameter in BasicText to let the textual content dimension robotically adapt to the container dimension:
Field { BasicText( textual content = "Hiya World", maxLines = 1, autoSize = TextAutoSize.StepBased() ) }

You’ll be able to customise sizing by setting a minimal and/or most font dimension and outline a step dimension. Compose Basis 1.8 incorporates this new BasicText overload, with Materials 1.4 to comply with quickly with an up to date Textual content overload.
Moreover, Compose 1.8 enhances textual content overflow dealing with with new TextOverflow.StartEllipsis or TextOverflow.MiddleEllipsis choices, which let you show ellipses at first or center of a textual content line.
val textual content = "This can be a lengthy textual content that may overflow" Column(Modifier.width(200.dp)) { Textual content(textual content, maxLines = 1, overflow = TextOverflow.Ellipsis) Textual content(textual content, maxLines = 1, overflow = TextOverflow.StartEllipsis) Textual content(textual content, maxLines = 1, overflow = TextOverflow.MiddleEllipsis) }

And at last, we’re increasing help for HTML formatting in AnnotatedString, with the addition of bulleted lists:
Textual content(
AnnotatedString.fromHtml(
"""
“””.trimIndent()
)
)

Visibility monitoring
Compose UI 1.8 introduces a brand new modifier: onLayoutRectChanged. This API solves many use instances that the prevailing onGloballyPositioned modifier does; nonetheless, it does so with a lot much less overhead. The onLayoutRectChanged modifier can debounce and throttle the callback per what the use case calls for, which helps with efficiency when it’s added onto an merchandise in LazyColumn or LazyRow.
This new API unlocks options that rely upon a composable’s visibility on display. Compose 1.9 will add higher-level abstractions to this low-level API to simplify frequent use instances.
Animate composable bounds
Final yr we launched shared aspect transitions, which easily animate content material in your apps. The 1.8 Animation module graduates LookaheadScope to steady, contains quite a few efficiency and stability enhancements, and features a new modifier, animateBounds. When used inside a LookaheadScope, this modifier robotically animates its composable’s dimension and place on display, when these change:
Field( Modifier .width(if(expanded) 180.dp else 110.dp) .offset(x = if (expanded) 0.dp else 100.dp) .animateBounds(lookaheadScope = this@LookaheadScope) .background(Coloration.LightGray, form = RoundedCornerShape(12.dp)) .peak(50.dp) ) { Textual content("Structure Content material", Modifier.align(Alignment.Middle)) }

Elevated API stability
Jetpack Compose has utilized @Experimental annotations to mark APIs which might be liable to vary throughout releases, for options that require greater than a library’s alpha interval to stabilize. We now have heard your suggestions that various options have been marked as experimental for a while with no modifications, contributing to a way of instability. We’re actively taking a look at stabilizing present experimental APIs—within the UI and Basis modules, we’ve diminished the experimental APIs from 172 within the 1.7 launch to 70 within the 1.8 launch. We plan to proceed this stabilization development throughout modules in future releases.
Deprecation of contextual circulation rows and columns
As a part of the work to scale back experimental annotations, we recognized APIs added in current releases which might be lower than optimum options for his or her use instances. This has led to the choice to deprecate the experimental ContextualFlowRow and ContextualFlowColumn APIs, added in Basis 1.7. In the event you want the deprecated performance, our suggestion for now’s to repeat over the implementation and adapt it as wanted, whereas we work on a plan for future elements that may cowl these functionalities higher.
The associated APIs FlowRow and FlowColumn at the moment are steady; nonetheless, the brand new overflow parameter that was added within the final launch is now deprecated.
Enhancements and fixes for core options
In response to developer suggestions, we’ve shipped some notably in-demand options and bug fixes in our core libraries:
- Make dialogs go edge to edge: When displayed full display, dialogs now keep in mind the total dimension of the display and can draw behind system bars.
Get began!
We’re grateful for the entire bug experiences and have requests submitted to our situation tracker – they assist us to enhance Compose and construct the APIs you want. Proceed offering your suggestions, and assist us make Compose higher.
Pleased composing!