当前位置:网站首页>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
、 partAnimatedVisibility
API、 - Vector correlation API:
rememberVectorPainter
、VectorProperty
、VectorConfig
andRenderVectorGroup
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 API
Send request to parent , Scroll elements into the view .
Update announcement :https://android-developers.googleblog.com/2022/02/jetpack-compose-11-now-stable.html
边栏推荐
猜你喜欢
这群程序员中的「广告狂人」,把抖音广告做成了AR游戏
连接局域网MySql
Flink 解析(四):恢复机制
TCP's three handshakes and four waves
Shell_ 05_ operator
吴军三部曲见识(五) 拒绝伪工作者
Set up the flutter environment pit collection
Mongodb learning notes
Programmer orientation problem solving methodology
Which is more important for programming, practice or theory [there are some things recently, I don't have time to write an article, so I'll post an article on hydrology, and I'll fill in later]
随机推荐
Yao BanZhi and his team came together, and the competition experts gathered together. What fairy programming competition is this?
汇编语言寻址方式
koa中间件
吴军三部曲见识(五) 拒绝伪工作者
唯有学C不负众望 TOP2 p1变量
Flink源码解读(二):JobGraph源码解读
List集合数据移除(List.subList.clear)
DS18B20数字温度计系统设计
Set up the flutter environment pit collection
Data transfer instruction
Mongodb learning notes
Flink 解析(四):恢复机制
唯有学C不负众望 TOP3 Demo练习
MySQL string function
Fdog series (VI): use QT to communicate between the client and the client through the server (less information, recommended Collection)
Assembly language addressing mode
Shell_ 07_ Functions and regular expressions
Flink 解析(七):时间窗口
Activiti directory (V) reject, restart and cancel process
Use of mongodb in node