Skip to content

Latest commit

 

History

History
46 lines (43 loc) · 1.68 KB

File metadata and controls

46 lines (43 loc) · 1.68 KB

moxy-dagger-mvp

the application intended for training moxy and di applying in mvp-project

In this simple app we can see an implementation of the following tools:

  • MVP

    An architecture pattern providing code-modularity
  • Moxy

    Tool which hepls you use view state for considering different events with ui (e.g. screen rotation). It saves presenter independly, whether any view is bound to it or not. And, furthermore, presenter interacts with view through view-interface. You should do the following steps:
    • Implement required libraries (app/build.gradle):
      implementation 'com.arello-mobile:moxy:1.5.5'
      implementation 'com.arello-mobile:moxy-app-compat:1.5.5'
      kapt 'com.arello-mobile:moxy-compiler:1.5.5'
    • Create View-interface implementing MvpView from moxy-library
    • Create presenter-class extending MvpPresenter
    • Inject to presenter viewState using @InjectViewState over the presenter-class
    • Implement view-interface at some activity, fragment or other
    • Inject presenter into view through @InjectPresenter annotation over required presenter-field in view-class
    • That's all) Now you can use presenter without caring about his recreation and configuration changes
  • Dagger 2

    Dependency injection applying
  • RxJava 2

    Multithreading calls managing
    • Reactive Network: dynamic internet connection observing
  • Data Binding

    Advanced dealing with UI by creating Binding adapters