不同的UI按钮必须将不同的数据列表传递给RecyclerView。在DAO中进行新的@查询,并作为回报获得新的LiveData<`List>对象。<Entry>> getNotesOfFolder(String path); //Returns LiveData with List of Entries
我应该用Viewmodel和SharedPrefernces更新我的用户详细信息吗?例如,我有类似的字段ageorganisation我现在几乎没有疑问:
private val _experience = MutableLiveData<String>()
val experience : LiveData<String&g
我试图把一个可流动的东西变成一个LiveData,但是我不能让它工作: 可流动的:(在存储库中) fun searchMyObjectByName(query: String): Flowable:(在ViewModel中) private val _myObject = MutableLiveData<ArrayList<MyObject>>()
val myObject: LiveData{ it -> resp