A simple demonstration of using Android Architecture Components + MVVM pattern using TMDB api. It follows the practice of single source of truth. The views have no idea where the data is coming from.
This project is evergrowing and I will keep updating it with more components as I learn.
The following diagram explains the architecture

This app targets API 28 and min SDK is API 23 (Marshmallow)
-
Retrofit - Type-safe HTTP client for Android and Java by Square, Inc.
-
Glide - An image loading and caching library for Android focused on smooth scrolling
-
Android Architecture Components - A collection of libraries that help you design robust, testable, and maintainable apps.
-LiveData - LiveData is an observable data holder class. Unlike a regular observable, LiveData is lifecycle-aware, meaning it respects the lifecycle of other app components, such as activities, fragments, or services.
-Room - The Room persistence library provides an abstraction layer over SQLite to allow fluent database access while harnessing the full power of SQLite.
-ViewModel - The ViewModel class is designed to store and manage UI-related data in a lifecycle conscious way.
-
Dagger2 - A fast dependency injector for Android and Java
-
LeakCanary - A memory leak detection library for Android and Java