Skip to content

jtyang/DroidMVP

 
 

Repository files navigation

DroidMVP

mvp diagram

Release Android Arsenal CircleCI

##About DroidMVP is a small Android library to help you incorporate the MVP pattern along with Passive View and Presentation Model (yes, those can be combined together :) ) within your Android project.

##Explanation

mvp diagram

A short explanation of PassiveView, PresentationModel and how to use it with DroidMVP can be found [in this article](https://medium.com/@andrzejchm/presentation-model-and-passive-view-in-mvp-the-android-way-fdba56a35b1e)

##Setup

Add it in your root build.gradle at the end of repositories:

allprojects {
  repositories {
      ...
      maven { url "https://jitpack.io" }
  }
}

Add the dependency to your app's build.gradle

  dependencies {
    compile 'com.github.andrzejchm:DroidMVP:0.1.1'
  }

##Composition over inheritance If by any chance you cannot extend from DroidMVPActivity or DroidMVPFragment you can always use the DroidMVPViewDelegate. Just make sure to bind it with your activity's or fragment's lifecycle the same way the DroidMVPFragment or DroidMVPActivity does it.

##Dependency Injection This library makes it easy to use it with dependency injection frameworks like Dagger. To see how it could be done, check out the Sample project, specifically the BaseFragment or BaseActivity

##Sample Project A small android app which uses Dependency Injection along with DroidMVP can be found here

About

Small Android library to help you incorporate MVP, Passive View and Presentation Model patterns in your app

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%