Heroes app illustrating Android development best practices with Android Jetpack.
For development, the latest version of Android Studio is required. The latest version can be downloaded from here.
This project uses the Gradle build system.
To build this project, use the gradlew build
command or use Build
command in Android Studio.
App uses Square coding styles. Here's how to configure it for use with Android Studio (instructions adapted from Sqaure README)
To use the app you will need to obtain API key from SuperHero API, then add it to config.xml
file like this:
<string name="heroes_api_key">your access key</string>
Model–View–ViewModel (MVVM) is a software design pattern that is structured to separate program logic and user interface controls. MVVM is also known as model-view-binder and was created by Microsoft architects Ken Cooper and John Gossman. Like many other design patterns, MVVM helps organize code and break programs into modules to make development, updating and reuse of code simpler and faster. The pattern is often used in Windows and web graphics presentation software.
Repository module handle data operations. They provide more generic API so that the rest of the app can access data layer easily.
- Retorift Used for API requests
- Room Used for database
- Dagger 2 Used for dependency injection
- Glide Used for image loading
- Navigation Handle everything needed for in-app navigation
- ViewModel Store UI-related data that isn't destroyed on app rotations. Easily schedule asynchronous tasks for optimal execution