Join Slack
Doing the following makes the UI emit values, but once new data is received from the backend, the UI...
# android-architecture
o
Ofir Bar
03/11/2020, 11:21 AM
Doing the following makes the UI emit values, but once new data is received from the backend, the UI still gets the initialized data:
k
Kirill Prybylsky
03/11/2020, 11:22 AM
That’s exactly what it must to do
o
Ofir Bar
03/11/2020, 11:25 AM
I observe this LiveData inside the
onStart()
in my UI, and it works for the first
onStart()
This populates a RecyclerView with data. However, if the data in the backend has changed, when the LiveData is called again when triggering
onStart()
again (navigating away and back to the UI) the UI still contains the initial list. So LiveData initial value can’t change I guess?
4
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by