Android MVVM boilerplate inspired by android-boilerplate and powered by data-binding
It's similar to android-boilerplate, differences:
Presenter
toViewModel
EventBus
toRxBus
shareReferenceHelper
is not proxied by data manager, but a static tools.
- Data-Binding
- RxJava2
- Retrofit2
- OKHttp
- binding —> binding adapters for databinding
- data —> Model(network, database)
- ui —> View and ViewModel(ui and business logic)
- util —> common tools
- widget —> common widget
We support all 3 in this project.
- Some page is simple, With MVVM, you need create at least 2 new files(class), With MVP, you need more files(class), why not just adopt MVC?
- Someone in your team, does not love MVVM, and used to work in MVP. OK, Forced love does not last.
- For all 3 architectures, Activity and Fragment are wrapped and easy to initialize.
Check base folder for more details.
Leverage Retrofit2
and RxJava2
to parse response and handle error(including loading) in common place, we just deal with data in business logic.
Check DataManager for more details
No need to write adapter agian and agian, with data-binding and BaseBindingRecycleViewAdapter, we just need provide a layout file and the array of data, then we get a recycleView
Leverage Rxjava
to post none-sticky event, no need to override any Activity method, and really easy and clean to use.
Check RxBus for more details.