Best practice to observe livedata from data class

前端 未结 0 1728
一个人的身影
一个人的身影 2020-12-30 11:37

I need to observe a LiveData object from a data class. I have observed these two methods are working:

Method 1: Convert the class to a LifecycleOwner

相关标签:
回答
  • 消灭零回复
提交回复
热议问题