A Model-View-Presenter / Model-View-Intent library for modern Android apps
Java Shell
Clone or download
Permalink
Failed to load latest commit information.
.buildscript Fixing circle ci v1 sh Jul 12, 2017
.github Update ISSUE_TEMPLATE.md Mar 20, 2017
gradle/wrapper gradle updated; android gradle plugin 3.1.0 Apr 7, 2018
mvi-common use unicast subject Apr 8, 2018
mvi-integration-test MviViewGroup integration tests added for destroying activity early in… Apr 24, 2018
mvi Added MVI Dialog Fragment Apr 24, 2018
mvp-common Fix some typos (#280) Oct 30, 2017
mvp-lce Added DialogFragment support (basic, LCE, ViewState) (#300) Apr 16, 2018
mvp-nullobject-presenter Update MvpNullObjectBasePresenter.java (#307) Mar 17, 2018
mvp-queuing-presenter fix typos in README (#295) Dec 17, 2017
mvp #290: Added null checks to prevent NPEs with ViewGroupDelegate clean… Apr 24, 2018
presentermanager Make MVI Sample look a little bit nicer Oct 3, 2017
sample-mail Removed findbugs annotations -> Replaced xml filter files to suppress… Apr 20, 2017
sample-mvi Fix #242 and #303 by internally using ReplaySubject for intents Mar 3, 2018
sample FragmentMvpViewStateDelegate is working now Sep 11, 2017
utils-fragment-integration-test Update build dependencies (#235) Apr 10, 2017
utils-fragment Update build dependencies (#235) Apr 10, 2017
viewstate FragmentMvpViewStateDelegate is working now Sep 11, 2017
.codeclimate.yml ShoppingCart Jan 3, 2017
.gitignore Trying circle ci Jul 12, 2017
.travis.yml Fix travis Mar 2, 2018
LICENSE Update LICENSE Oct 18, 2015
README.md fix typos in README (#295) Dec 17, 2017
build.gradle gradle updated; android gradle plugin 3.1.0 Apr 7, 2018
circle.yml Fixing circle ci v1 sh Jul 12, 2017
deploy_javadoc.sh Published javadocs for Mosby 3.0 Mar 11, 2017
findbugs.gradle Removed findbugs annotations -> Replaced xml filter files to suppress… Apr 20, 2017
gradle.properties 3.1.0 Release; Prepared next development iteration Nov 28, 2017
gradlew Update gralde wrapper version 4.0 -> 4.2.1 (#279) Oct 24, 2017
gradlew.bat Update build dependencies (#235) Apr 10, 2017
maven-push-java-lib.gradle Snapshot with docs and sources Apr 30, 2016
maven-push.gradle Snapshot with docs and sources Apr 30, 2016
settings.gradle Deprecated getView() and isViewAttached() in MVP base presenter Sep 8, 2017

README.md

Mosby

A Model-View-Presenter and Model-View-Intent library for Android apps.

Build Status

Dependency

dependencies {

  compile 'com.hannesdorfmann.mosby3:mvi:3.1.0' // Model-View-Intent
  // or
  compile 'com.hannesdorfmann.mosby3:mvp:3.1.0' // Plain MVP
  // or
  compile 'com.hannesdorfmann.mosby3:viewstate:3.1.0' // MVP + ViewState support
}

Additional modules:

dependencies {

  // MVP + ViewState + LCE Views
  compile 'com.hannesdorfmann.mosby3:mvp-lce:3.1.0'

  // Null Object Presenter for MVP
  compile 'com.hannesdorfmann.mosby3:mvp-nullobject-presenter:3.1.0'
  
  // Queuing Presenter for MVP
  compile 'com.hannesdorfmann.mosby3:mvp-queuing-presenter:3.1.0'
}

SNAPSHOT:

dependencies {

  compile 'com.hannesdorfmann.mosby3:mvi:3.1.1-SNAPSHOT'

  compile 'com.hannesdorfmann.mosby3:mvp:3.1.1-SNAPSHOT'
  compile 'com.hannesdorfmann.mosby3:viewstate:3.1.1-SNAPSHOT'

  compile 'com.hannesdorfmann.mosby3:mvp-lce:3.1.1-SNAPSHOT'
  compile 'com.hannesdorfmann.mosby3:mvp-nullobject-presenter:3.1.1-SNAPSHOT'
  compile 'com.hannesdorfmann.mosby3:mvp-queuing-presenter:3.1.1-SNAPSHOT'
}

You also have to add the url to the snapshot repository:

allprojects {
  repositories {
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
  }
}

Documentation

See the project website.

For Model-View-Intent check out this blog post series.

Changelog

The changelog can be found in the release section

Migrating

In Mosby 3.0 we have changed the package name from com.hannesdorfmann.mosby to com.hannesdorfmann.mosby3 (note the 3 at the end). Migrating a Mosby 2.x based app to Mosby 3.0 should be straightforward: Just replace all import statements of your app in android studio with Edit -> Find -> Replace in Path ... and set find import com.hannesdorfmann.mosby replace with import com.hannesdorfmann.mosby3. There were also some minor API changes (see changelog), but most apps should be fine by replacing the import statements.

Conductor

Mosby has a plugin for Conductor. You can find it here: https://github.com/sockeqwe/mosby-conductor

License

Copyright 2015 Hannes Dorfmann

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.