I have a Room Database table with multiple columns (PartsTable). I need to fetch only one column from the table that contains one word String and I’m using a subset of a table as per google docs (PartsTuple). Now I need to create a function that will or something else that will return the ArrayList of fetched data, which I
Tag: android-livedata
Merging multiple LiveData sources?
To make it easier to visualize my problem I drew the following: I am using a RoomDatabase, a Repository, a Viewmodel and Livedata. Areas have a 1 to n relationship with Gateways and Gateways a 1 to n relationship with Items. I created both an AreaWithGateways entity and a GatewayWithItems entity. Items can move from a gateway to another, which
Toast message inside MutableLiveData.observe() working repeatedly
I have a register form and ı want to show a message to the user based on signed up successfully or not.I store that message in my view model which has a mutable live data object to store that message …
Why LiveData setValue or PostValue triggers onChange just once in the view?
LiveData setValue should have triggered the onChanged method in the Activity, however it calls only at the first time, after when I try to make paging, it breaks and doesn’t call onChanged anymore, though my response is does successful and I see it in the log. What’s wrong with setValue/postValue? Is it a bug? Should I implement observer pattern on