项目作者: harunagic

项目描述 :
Heroes app illustrating Android development best practices with Android Jetpack using MVVM architecture.
高级语言: Kotlin
项目地址: git://github.com/harunagic/heroes.git
创建时间: 2020-10-29T17:00:45Z
项目社区:https://github.com/harunagic/heroes

开源协议:

下载


Heroes (android mobile app)

Heroes app illustrating Android development best practices with Android Jetpack.

Getting Started

Android Studio IDE setup

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.

Coding style

App uses Square coding styles.
Here’s how to configure it for use with Android Studio (instructions adapted from Sqaure README)

SuperHero API key

To use the app you will need to obtain API key from SuperHero API, then add it to config.xml file like this:

  1. <string name="heroes_api_key">your access key</string>

Screenshots

Screen1 Screen2 Screen3 Screen4 Screen5

Architecture

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.

MVVM

Repository module handle data operations. They provide more generic API so that the rest of the app can access data layer easily.

Repository patternb

Libraries

  • 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