Jetpack Compose 1.2, Google’s toolkit for constructing native Android UIs, is now typically obtainable. Highlights of the replace embody textual content enhancements reminiscent of font padding and downloadable fonts.
Jetpack Compose is the Google-recommended method to construct new Android apps for telephones, tablets, and foldables. The 1.2 launch was declared secure on July 27.
With downloadable fonts, app builders acquire new APIs to entry Google Fonts asynchronously and to outline fallback fonts with no advanced setup. Advantages embody smaller APK sizes and improved system well being, Google mentioned, as a result of a number of apps can share the identical font by a supplier.
Addressing a top-voted bug within the Android subject tracker, Jetpack Compose 1.2 makes includeFontPadding
a customizable parameter. Google recommends setting this worth to false
, which can allow extra exact alignment of textual content inside layouts. The plan is to make false
the default worth in a future launch.
Jetpack Compose 1.2 might be accessed from the Android builders web site. The Jetpack Compose 1.0 manufacturing launch was printed final July.
Different enhancements in Jetpack Compose 1.2 embody:
- For lazy layouts, grid APIs
LazyVerticalGrid
andLazyHorizontalGrid
have graduated out of experimental standing. A brand new experimental API,LazyLayout
, lets builders implement customized layouts. - A
WindowInsets
class offers modifiers reminiscent ofwindowInsetsPadding
,systemBarsPadding
, andwindowInsetsTopHeight
to take care of insets of a tool. Modifer.nestedScroll
presents nested scroll interoperability with views.- Easing curves assist write animations effectively.
- Mouse assist has been improved.
- Bugs have been fastened reminiscent of permitting animations to comply with the system-defined “Animation period scale” and permitting scolling of lazy laouts to be disabled by including a
userScrollEnabled
parameter. - Compose for the Put on OS 1.0 smartwatch platform is now typically obtainable.
Copyright © 2022 IDG Communications, Inc.