当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
微信实现扫码支付(native)
响应式pbootcms模板仪表水表类网站
11.cuBLAS开发指南中文版--cuBLAS中的Level-1函数amax()和amin()
PO、DO、TO、VO、DO、DTO、DAO、POJO都是什么?
机器学习web服务化实战:一次吐血的服务化之路 (转载非原创)
常用函数
浅谈CQRS模式
Q_04_06 把它放在一起:传送
SEATA分布式事务框架解析
openharmony容器组件之Counter
Jetpack Compose——TextField及OutlinedTextField(文本框)的使用
行程和用户[阅读理解法]
操作系统迁移实战之在openEuler上部署MySQL数据库
Q_08 更多信息
Unity3d_API_GPS_LocationService
X264性能优化
pytest 筛选用例
Q_06_04 语句和其他构造
RobotFramework简介
GridContainer of openharmony container component









