当前位置:网站首页>Jetpack Compose - remember, mutableStateOf, rememberSaveable
Jetpack Compose - remember, mutableStateOf, rememberSaveable
2022-08-09 14:19:00 【lplj717】
1, mutableStateOf: indicates that this data is stateful. If the state changes, all Views that reference this state need to be redrawn
2, remember: store the value, when the interface is redrawn, the previous value will be read, which is equivalent to adding another layer of content on top of mutableStateOf: store the value of this variable out of the function, that is, the value will not become the initial value if the function is executed again, but it will fail if the page is switched
3, rememberSaveable: On remember, it is guaranteed that data can be saved during page switching
rememberSaveable== remeber + onSaveInstanceState+ read savedInstanceState in onCreate
When configChanges,Write the value of remember into the bundle, and then read the data from the bundle when rebuilding the Activity
边栏推荐
猜你喜欢
随机推荐
响应式pbootcms模板仪表水表类网站
从荷兰国旗问题到快排优化升级
group by的工作原理和优化思路
NC161 二叉树的中序遍历
几种常见路由类型及其优先级
C#使用cersharp
使用 NVIDIA Kaolin Wisp 重建3D场景
JZ7 重建二叉树
Operating system migration practice deploying MySQL database on openEuler
RobotFramework简介
Jetpack Compose——remember、mutableStateOf、rememberSaveable
技嘉显卡 RGBFusion 不能调光解决方法
音视频录入的pts和dts问题
Jetpack Compose——Button(按钮)的使用
01_iTween_第一天--小球抛物线
GridContainer of openharmony container component
Full GC (Ergonomics)排查分析
vivo手机上的系统级消息推送平台的架构设计实践
响应式pbootcms模板家禽饲养类网站
Jetpack Compose——Image使用Coli加载网络图片(包含GIF、SVG)