Sample to show how MVP, Clean Architecture and RxJava can help you in building Android App.
_WORK IN PROGRESS_
Here one can see yet another example of building an Android Application with help of MVP, Clean Architecture and RxJava.Project contains of two submodules:
- core: base classes
- weather: sample app, displaying current temperature in Moscow based on OpenWeatherMap api (add valid api-key in build.gradle to see the results)
- Also here you can find seceral useful techinques:
- saving presenter during configuration change / low - memory. This techinque is implemented using Dagger2 with its custom scopes + fragment-lifecycle awareness.
- improved communication between view and presenter. Details can be found in the article
- navigation support, post about implementation details is in this article
- Basic approach for manual ViewState management is introduced, and the main reason for that - the fact that using onSaveInstanceState can lead to data loss
- Also dependency 'dialogwrapper.aar' appeared, it is a library to abstract away complexities of working with dialogs. Sources with the base implementation can be found here. This approach for dealing with dialogs works for me.
NOW IN PROGRESS:
- Reducing amounts of boilerplate code / time to write boilerplate code
- Custom views support
- dealing with real-world scenario (viewpager for now)
TODO:
- cover common (but interestring in terms of implementation in mvp) use cases during app development :
services interaction,
lists,
view_pager etc.
- proper testing
- further architecture improvement
TODO