/AndroidMvc

Primary LanguageJavaApache License 2.0Apache-2.0

AndroidMvc Framework

Build Status Coverage Status Maven Central

Website

http://kejunxia.github.io/AndroidMvc

Features

  • Easy to apply MVC/MVVM pattern for Android development
  • Event driven
  • Easy testing for controllers on JVM without Android dependency
  • Dependency injection with Poke to make mock easy
  • Manage navigation by NavigationController which is also testable
  • Improved Fragment life cycles - e.g. Differentiate why view is created: 1. Reason.isNewInstance(), 2. Reason.isFirstTime(), 3. Reason.isRestored(), 4 Reason.isRotated()
  • Automatically save restore instance state

Samples

  • Counter - A simple sample demonstrates how to use the framework including dependency injection, event bus, unit testing, navigation and etc.

    See Source code here and download Sample APK here

  • Note - A more complex sample to make notes and query weathers with slide menu and also demonstrates how consume network resources (public weather API) and test the async task without depending on Android SDK on pure JVM.

    See Source code here and download Sample APK here

Download

The library is currently release to jCenter and MavenCentral

Maven:

<dependency>
    <groupId>com.shipdream</groupId>
    <artifactId>android-mvc</artifactId>
    <version>1.3.0</version>
</dependency>

Gradle:

compile "com.shipdream:android-mvc:1.3.0"

Dependency injection with reference count

See the documentation of Poke