Jetpack Compose 1.2, Google’s toolkit for building native Android UIs, is now available as a beta release. Highlights of the update include text improvements such as font padding and downloadable fonts.
With downloadable fonts, app developers gain new APIs to access Google Fonts asynchronously and to define fallback fonts without a complex setup. Benefits include smaller APK sizes and improved system health, Google said, because multiple apps can share the same font through a provider.
Addressing a top-voted bug in the Android issue tracker, Jetpack Compose 1.2 makes
includeFontPadding a customizable parameter. Google recommends setting this value to
false, which will enable more precise alignment of text within layouts. The plan is to make
false the default value in a future release.
Other improvements in Jetpack Compose 1.2 include:
- New tools and guidance for improving app performance.
- A text magnifier widget that makes selecting text easier.
- For lazy layouts, grid APIs
LazyHorizontalGridhave graduated out of experimental status. A new experimental API,
LazyLayout, lets developers implement custom layouts.
- When embedding a scrolling composable in
CoordinatorLayoutfrom the view system, developers can ensure that scroll behaviors are interoperable, thus making it easier to set up a collapsible toolbar.
- Window size classes featured in the release make it easier to develop resizable layouts. These are in an alpha state as part of new Material 3 libraries.
- To help developers use Compose more effectively, the Android Studio Dolphin IDE release, now in beta, adds features for Compose development. An Animation Coordination tool lets developers see and scrub through all animations at once while Multipreview Annotation aids building for multiple screen sizes.
- Compose for the Wear OS smartwatch platform has moved to a beta stage.