android-mvvm
android-mvvm copied to clipboard
MVVM on Android using RxJava and Data Binding
`MvvmActivity` allows for easy setup of activities. A similar `MvvmFragment` can be added to allow easy setup of fragments.
Usecase: Two Way binding is required Value of the field needs to be updated from an observable. As of now, two way binding has been implemented using vanilla `ObservableField`. Hence,...
Use composition instead of inheritance for `MvvmActivity`
There is a common pattern between ViewPagerAdapter and RecyclerViewAdapter, which will likely be present in other adapters to come. This functionality can be extracted in a separate class `MVVMAdapter` perhaps....
Example: Selected state for items in RecyclerView. When any item is selected, others should get deselected.
ItemVM: - title - image (optional) - quantity in cart - add, subtract handlers