Today, we’re releasing version 1.1 of Jetpack Compose, Android’s modern, native UI toolkit, continuing to build out our roadmap. This release contains new features like improved focus handling, touch target sizing,
ImageVector caching, and support for Android 12 stretch overscroll. Compose 1.1 also graduates a number of previously experimental APIs to stable and supports newer versions of Kotlin. We’ve already updated our samples, codelabs, and Accompanist library to work with Compose 1.1.
New stable features and APIs
Image vector caching
Compose 1.1 introduces image vector caching bringing big performance improvements. We’ve added a caching mechanism to
painterResource API to cache all instances of
ImageVectors that are parsed with a given resource id and theme. The cache will be invalidated on configuration changes.
From our partners:
Touch target sizing
With respect to Compose 1.0, Material components will expand their layout space to meet Material accessibility guidelines touch target size. For instance, a
RadioButton's touch target will expand to a minimum size of 48x48dp, even if you set the
RadioButton‘s size to be smaller. This aligns Compose Material to the same behavior of Material Design Components, providing consistent behavior if you mix Views and Compose. This change also ensures that when you create your UI using Compose Material components, minimum requirements for touch target accessibility will be met.
If you find this change breaks existing layout logic, set
<a href="https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalMinimumTouchTargetEnforcement()" target="_blank" rel="noopener">LocalMinimumTouchTargetEnforcement</a> to
false to disable this behavior, but please be mindful this might reduce the usability of your app, and should be used with caution.
RadioButton touch target update
Left: Compose 1.0, right: Compose 1.1
Experimental to stable APIs
Several APIs graduated from experimental to stable. Highlights include:
- Animation related APIs, such as:
<a href="https://developer.android.com/reference/kotlin/androidx/compose/animation/EnterTransition" target="_blank" rel="noopener">EnterTransition</a>,
<a href="https://developer.android.com/reference/kotlin/androidx/compose/animation/ExitTransition" target="_blank" rel="noopener">ExitTransition</a>, some of the
<a href="https://developer.android.com/reference/kotlin/androidx/compose/animation/package-summary#AnimatedVisibility(kotlin.Boolean,androidx.compose.ui.Modifier,androidx.compose.animation.EnterTransition,androidx.compose.animation.ExitTransition,kotlin.String,kotlin.Function1)" target="_blank" rel="noopener">AnimatedVisibility</a>APIs,
- Vector related APIs:
<a href="https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/package-summary#rememberVectorPainter(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Float,kotlin.String,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.BlendMode,kotlin.Function2)" target="_blank" rel="noopener">rememberVectorPainter</a>,
<a href="https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/VectorProperty" target="_blank" rel="noopener">VectorProperty</a>,
<a href="https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/VectorConfig" target="_blank" rel="noopener">VectorConfig</a>, and
<a href="https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/package-summary#RenderVectorGroup(androidx.compose.ui.graphics.vector.VectorGroup,kotlin.collections.Map)" target="_blank" rel="noopener">RenderVectorGroup</a>
New experimental APIs
We’re continuing to bring new features to Compose. Here are a few highlights:
AnimatedContentcan now be saved and restored when using
LazyColumn/LazyRowitem positions can be animated using
<a href="https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyItemScope#(androidx.compose.ui.Modifier).animateItemPlacement(androidx.compose.animation.core.FiniteAnimationSpec)" target="_blank" rel="noopener">Modifier.animateItemPlacement()</a>.
- You can use the new
BringIntoViewAPI to send a request to parents so that they scroll to bring an item into view.
Try out the new APIs using
<a href="https://developer.android.com/reference/kotlin/androidx/annotation/OptIn" target="_blank" rel="noopener">@OptIn</a> and give us feedback!
Note: Using Compose 1.1 requires using Kotlin 1.6.10. Check out the Compose to Kotlin Compatibility Map for more information.
Wondering what’s next? Check out our updated roadmap to see the features we’re currently thinking about and working on, such as lazy item animations, downloadable fonts, moveable content, and more!
Jetpack Compose is stable, ready for production, and continues to add the features you’ve been asking us for. We’ve been thrilled to see tens of thousands of apps start using Jetpack Compose in production already and we can’t wait to see what you’ll build!
We’re grateful for all of the bug reports and feature requests submitted to our issue tracker over the Alphas and Betas – they help us to improve Compose and build the APIs you need. Do continue providing your feedback and help us make Compose better!
For enquiries, product placements, sponsorships, and collaborations, connect with us at [email protected]. We'd love to hear from you!
Our humans need coffee too! Your support is highly appreciated, thank you!