当前位置:网站首页>Jetpack compose 1.1 release, based on kotlin's Android UI Toolkit
Jetpack compose 1.1 release, based on kotlin's Android UI Toolkit
2022-07-06 17:15:00 【Open source China Information】
Jetpack Compose yes Android be based on Kotlin Modern primordial UI tool kit , It can help developers build applications faster , Open source by Google .Jetpack Compose 1.1 The version includes some new features , Such as improved focus processing 、 Forcibly expand the touch target size 、ImageVector cache , And support Android 12 Stretching and rolling effect , In addition, some experimental api Become stable , And support Kotlin A new version of the .
Be careful : Use Compose 1.1 Need to use Kotlin 1.6.10.
Image vector cache
Compose 1.1 Image vector cache is introduced , by painterResource API Added a caching mechanism : Cache all given resources id And topic resolution ImageVectors example , Brings huge performance improvements .
Be careful : When changing the configuration , The cache will be invalidated .
Force extended touch target size
stay Jetpack Compose 1.1 edition ,Material Components will expand the layout space , To satisfy Material Of Accessibility guide - Touch the target size standard .
for example RadioButton's, Even if developers will RadioButton The size of is set smaller , The minimum size of the touch target will also be expanded to 48x48dp. Figure below :

Left for Jetpack Compose 1.0 Available touch settings , The right to Jetpack Compose 1.1 Forcibly expand the effect after touching the target size .
Can be set by LocalMinimumTouchTargetEnforcement by false To disable this feature .
From experimental to stable API
- Animation related API, Such as :
EnterTransition、ExitTransition、 partAnimatedVisibilityAPI、 - Vector correlation API:
rememberVectorPainter、VectorProperty、VectorConfigandRenderVectorGroup
New experimental API
- Use
rememberSaveable. when , It can also be saved and restoredAnimatedContent - have access to
Modifier.animateItemPlacement(). Yes LazyColumn/LazyRow Perform animation positioning - You can use the new
BringIntoView APISend request to parent , Scroll elements into the view .
Update announcement :https://android-developers.googleblog.com/2022/02/jetpack-compose-11-now-stable.html
边栏推荐
猜你喜欢

吴军三部曲见识(七) 商业的本质

Akamai浅谈风控原理与解决方案

TCP的三次握手和四次挥手

姚班智班齐上阵,竞赛高手聚一堂,这是什么神仙编程大赛?

Assembly language segment definition

Log4j2 major vulnerabilities and Solutions

Alibaba cloud server docker installation mysql5.5

Fdog series (V): use QT to imitate QQ to realize login interface to main interface, function chapter.

Notes on how the network is connected

Coursera cannot play video
随机推荐
TCP's three handshakes and four waves
登陆验证koa-passport中间件的简单使用
Description of project structure configuration of idea
JVM之垃圾回收器上篇
8086 CPU internal structure
When it comes to Google i/o, this is how ByteDance is applied to flutter
Activiti目录(一)重点介绍
肖申克的救赎有感
Activiti directory (I) highlights
Learn the wisdom of investment Masters
On the clever use of stream and map
The difference between URI and URL
Login to verify the simple use of KOA passport Middleware
Yum install XXX reports an error
MySQL日期函数
服务器端渲染(SSR)和客户端渲染(CSR)的区别
Take you hand-in-hand to do intensive learning experiments -- knock the level in detail
学习投资大师的智慧
MySQL date function
Only learning C can live up to expectations top2 P1 variable