Giter VIP home page Giter VIP logo

base-mvp-file-template-generator's Introduction

File template generator

Use this plugin to create template files for BaseMvp repository.

Installation

  1. Create directory ~/.android/templates/other/ if not exist
  2. Copy BaseMvpTemplate and BaseMvpTemplateFragment to other directory
  3. Open (or restart) Android Studio
  4. Open your project that base on BaseMvp

Step by step

Imagine you have to implement a sign in activity.

  1. Create signin package inside feature directory
  2. Right click on signin directory, go to New -> Other -> BaseMvp Template Activity
  3. In Activity Name, insert SignIn (without Activity)
  4. press Finish button
  5. You will see there are 4 files created
    • SignInActivity.kt
    • SignInModule.kt
    • SignInPresenter.kt
    • SignInView.kt
  6. Open SignInActivity.kt and you will see comment like this:
    /*
    * After activity created, you must:
    * - inject this activity in core/di/module/FeatureModule.kt, like this:
    *    @PerFeature
    *    @ContributesAndroidInjector(modules = [SignInModule::class])
    *    abstract fun bindSignInActivity(): SignInActivity
    * - insert this activity to AndroidManifest.xml
    */
  7. Copy abstract function to core/di/module/FeatureModule.kt file
  8. Insert SignInActivity.kt to AndroidManifest.xml

base-mvp-file-template-generator's People

Contributors

hahn avatar

Watchers

 avatar  avatar

base-mvp-file-template-generator's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.