今日总结:关于setLifecycleOwner(this)的方法

setLifecycleOwner(this):方法,

 

如果不绑定生命周期那么DataBinding无法感知LiveData的变化,这样会导致ui无法跟着数据一同改变。

posted @ 2022-04-29 21:58  stdrush  阅读(675)  评论(0)    收藏  举报