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

Related tags

Utility DroidMVP
Overview

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.3'
  }

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

Without dagger can be found here.

With Parcelable PresentationModel can be found here.

Donation

If you think the library is awesome and want to buy me a beer, you can do so by sending some...

  • Ethereum ETH here: 0xf7354a0F7B34A380f6d68a2661bE465C10D6AEd7
  • Bitcoin BTC here: 12bU3BMibFqbBBymaftXTDnoHojFymD7a6
  • NEO NEO or GAS here: AX1ovzRN2N28WJrtehjYXjwtHSvcqva6Ri
You might also like...
Small command-line utility to safely merge multiple WhatsApp backups (msgstore.db) into one.

whatsapp-database-merger A small command-line utility that can be used to merge multiple WhatsApp databases (msgstore.db) into one. A few notes: input

A Telegram bot utilities that help to reduce the code amount

Flume Party A Telegram bot utilities that help to reduce code amount. Real project examples Pull Party Bot: 19% of code has been reduced. Resistance B

Simple project to help people track their crusade progress

Crusade-helper Simple project to help people track their crusade progress Core module Contains: model - package with all database structure service -

Provides custom lint rules developed by Bottle Rocket Studios to help keep our code cleaner
Provides custom lint rules developed by Bottle Rocket Studios to help keep our code cleaner

Provides custom lint rules developed by Bottle Rocket Studios to help keep our code cleaner, detect and mitigate possible security issues, and allow us to write rules around best practices and usage as necessary in the future

adds an option to the Android Sharesheet that allows you to save files to your device.
adds an option to the Android Sharesheet that allows you to save files to your device.

Save On Device adds an option to the Android Sharesheet that allows you to save files to your device. Download Get the app from the Google Play Store

Tell you how to manage your blackhorse

Tell you how to manage your blackhorse

Android library to easily serialize and cache your objects to disk using key/value pairs.

Deprecated This project is no longer maintained. No new issues or pull requests will be accepted. You can still use the source or fork the project to

A library to quickly and easily enable multiple monitoring & support platforms for your mobile apps

You have a small team. Setting up crash reporting tools, event tracking tools, and log management services is not what you want to spend your hours do

SharedPreference Library to save all types including your custom types and observe them if need be.

A SharedPreference Library that can be used to store all types including your custom classes and observe them too if needed.

Comments
  • Which would be the best way to do an async database call when using DroidMVP?

    Which would be the best way to do an async database call when using DroidMVP?

    Hi Andrzej,

    We would like to use DroidMVP library in our project. From the MVP examples that we have researched, this one seems to be the most clear, easy to understand and adapt to our project.

    What we would like to know is what do you believe that would be the best way to implement an async database call from a presenter. Would you be kind to add such an example in the sample app?

    Thanks in advance, Cristi.

    opened by cristian-calugar 2
  • Fix broken headings in Markdown files

    Fix broken headings in Markdown files

    GitHub changed the way Markdown headings are parsed, so this change fixes it.

    See bryant1410/readmesfix for more information.

    Tackles bryant1410/readmesfix#1

    opened by bryant1410 1
  • 0.1.2 release

    0.1.2 release

    • Now the PresentationModel can implement Parcelable in addition to Serializable
    • Adding getPresenter() methods to both DroidMVPActivity and DroidMVPFragment
    • Adding sample without using dagger 2 library.
    • Adding sample with the use of Parcelable interface
    opened by andrzejchm 0
Releases(0.1.4)
  • 0.1.3(Aug 10, 2016)

    Adding support for custom PresentationModelSerializer which encapsulates the logic of serializing and deserializing your PresentationModel to/from the Bundle object. Thanks to this you can now easly incorporate libraries such as Parceler without any hastle into your code to work with DroidMVP.

    All you have to do to use your own PresentationModelSerializer is to override the createPresentationModelSerializer() method within either DroidMVPFragment or DroidMVPActivity providing your own implementation

    Source code(tar.gz)
    Source code(zip)
  • 0.1.2(Jul 10, 2016)

    • Now the PresentationModel can implement Parcelable in addition to Serializable
    • Adding getPresenter() methods to both DroidMVPActivity and DroidMVPFragment
    • Adding sample without using dagger 2 library.
    • Adding sample with the use of Parcelable interface
    Source code(tar.gz)
    Source code(zip)
  • 0.1.1(Jun 23, 2016)

  • 0.1.0(Jun 22, 2016)

Owner
Andrzej Chmielewski
Mobile development enthusiast (iOS, Android, Flutter) with some backend skills (Node, Typescript)
Andrzej Chmielewski
compaKTset is a small library aimed at providing you with the most memory efficient Set implementation for any particular data type of your choosing.

compaKTset is a small library aimed at providing you with the most memory efficient Set implementation for any particular data type of your choosing.

Ignat Beresnev 3 Nov 16, 2021
Dagger Hilt, MVP Moxy, Retrofit, Kotlin coroutine, Sealed class

Dagger Hilt, MVP Moxy, Retrofit, Kotlin coroutine, Sealed class

Dostonjon 1 Nov 2, 2021
A small library which will save you from writing the same intent creation code again and again for the most simple tasks

Android Intents A small library which will save you from writing the same intent creation code again and again for the most simple tasks. I found myse

MarvinLabs 420 Nov 20, 2022
A command line utility to help you investigate the sensitive data associated with Macie findings.

Macie Finding Data Reveal This project contains a command line utility to help you investigate the sensitive data associated with Macie findings.

AWS Samples 8 Nov 16, 2022
A logger with a small, extensible API which provides utility on top of Android's normal Log class.

This is a logger with a small, extensible API which provides utility on top of Android's normal Log class. I copy this class into all the little apps

Jake Wharton 9.8k Dec 30, 2022
A small utility to record Android device screen to a GIF

RoboGif A small utility to record Android device screen to an optimized GIF so you can paste it to GitHub or a similar service. Requirements Python 2.

Jernej Virag 526 Dec 9, 2022
A collection of small utility functions to make it easier to deal with some otherwise nullable APIs on Android.

requireKTX is a collection of small utility functions to make it easier to deal with some otherwise nullable APIs on Android, using the same idea as requireContext, requireArguments, and other similar Android SDK methods.

Márton Braun 82 Oct 1, 2022
Small utility used to add Homewizard Energy Socket tiles to Android Quick Settings

TileWizard [Alpha! Unstable!] Settings Result Functionality: Add up to 5 Wi-Fi Energy Sockets to Android Quick Settings. What do you need: Android dev

Niels Masdorp 2 Oct 19, 2021
Small utility to create/restore encrypted backups

Quick Backup Choose some files and quickly create a complete encrypted and compressed file. Usage Clone the repository Run gradlew installShadowDist T

Leonardo Colman 5 Sep 18, 2021