oday
02/16/2019, 12:09 AMleaseCarsVM.getLeaseCarsResult().observe(this, getLeaseCarsObserver)
leaseCarsVM.getLeaseCars(true)
swiperefreshLayout.setOnRefreshListener {
leaseCarsVM.getLeaseCarsResult().observe(this, getLeaseCarsObserver)
leaseCarsVM.getLeaseCars()
}
try moving it to say the beginning of the screen, all of them together hooked up to the various other observers, and then make the VM calls later, they don’t come back successfully, has to be before the call..dewildte
02/16/2019, 5:32 PMLifecycleOwner
and LiveData Observer
is being used to observe changes to a list of cars.
The only code you should be putting in refresh listener is the request to get more cars.onActivityCreated()
oday
02/17/2019, 12:39 PM