IMPORTANT!!! READ FIRST!!!
MVP architecture for Kotlin project with Dependency Injection and Interactors
Plugin for generating MVP: https://plugins.jetbrains.com/plugin/9760-mvp-generator
Plugin for generating kotlin classes from JSON: https://github.com/wuseal/JsonToKotlinClass
When generating Activity using MVP Generator:
When generatring Fragment using MVP Generator:
NOTE that presenter is being injected after onCreate (Activity) or onCreateView (Fragment), so use for example onStart (Activity) or onResume (Fragment) to work with presenter
To create DialogFragment using MVP, create Fragment (as above) and change name of extended class to MvpDialogFragment or MvpFullscreenDialogFragment
Interactors are used to work with database and online sources
Usable tools:
Rename package name! Example: https://stackoverflow.com/questions/16804093/android-studio-rename-package
Right click on package, refactor and then rename. Manifest will change, but it is needed to change "application id" in gradle