Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Architecture Components refactor: LiveData & ViewModel #41
LiveData & ViewModel
This PR is meant to showcase how to replace
In this project, RxJava was used to perform asynchronous work in a separate thread, execute some transformations on the downloaded data and callback the main thread with the result.
All that can be done with
The sample app existing key components are:
The proposed changes in this PR change that scenario:
This app is divided in two modules:
Upcoming PRs will showcase how to use other Architecture Components:
In order to showcase some of those components, it might be necessary to extend the app and add a few more use cases and screens.
Progress will be tracked here: https://github.com/novoda/android-demos/projects/1
I think would have been cool to do separate livedata and ViewModel.
In my understanding, swapping out of Rx would involve using a different bg threading mechanism (I guess this is the Call return type in retrofit interface) + livedata for observer pattern: viewmodel stuff isn't related.