Clean architecture is what developers strike for in any platform development. In recent years, there are many attempts to make clean architecture in Android a thing for reusable code and easy test-ability. That’s a good sign for Android development community and there have been many good tutorials and templates to learn from.
This article is a step-by-step introduction to MVP on Android. It shows both simple examples and advanced ones with best practices.
Google should have created this template and made it as built-in plugin for Android Studio. This is a MVP template created by ProAndroidDev. You can forget about the boilerplate code written on the beginning of a new project. It is not a one-size-fit-all solution so you need to modify the template based on your project’s features and design.
This project, created by google employees showcases a basic Model‑View‑Presenter architecture. The result will be a to-do app with basic features, including tasks list, task detail, task adding/editing, and statistics. This todo-mvp project uses the following dependencies: Common Android support libraries, Android Testing Support Library, Mockito, and Guava.
This is an boilerplate template ribot use as a reference for new Android projects. You can see how they integrate popular libraries: Support libraries, RecyclerViews and CardViews, RxJava and RxAndroid, Retrofit 2, Dagger 2, SqlBrite, Butterknife, Timber, Glide, AutoValue with extensions AutoValueParcel and AutoValueGson, Functional tests with Espresso, Robolectric, Mockito, and Checkstyle, PMD and Findbugs for code analysis.
Exchange Rates (MVVM)
This is an currency exchanging app which incorporates MVVM, data binding, RxJava2, Dagger2 and clean architecture approach.
Android starter (MVP)
Android starter is a MVP project with support of Dagger2, RxJava2, Robolectric, Espresso, and Mockito. It provides a generator to quickly create a Android template project.
This tutorial guides you through MovieNight, an app that uses the clean architecture approach and is written in Kotlin. MovieNight uses The MovieDB public API, which is free to register.
This template demonstrates MVP approach written in Kotlin in addition to components from Android Architecture Components Library such as ViewModels, Room. It features Kotlin, Android Architecture Components, Android Support Libraries, RxJava2, Dagger 2 (2.11), Glide, Retrofit, OkHttp, Gson, Timber, Mockito, Espresso, and Robolectric.