Skip to content

wangjiegulu/CleanAndroidProject_MVP

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CleanAndroidProject_MVP

Clean Android Project Example (MVP).

Libraries and tools used

Packages

app:
/com/your/packages/
    |
    +--- application/ -> Application, initialize modules.
    |     |
    |     +--- configuration/
    |             |
    |             +--- AppSchedulers -> Schedulers of RxJava in viewer layer.
    |
    |
    +--- inject/ -> DI configuration, inject interactors from bll(business logic layer).
    |
    +--- control/ -> Custom views.
    |
    +--- ui/ -> All ui pages of app.
          |
          +--- /{main} -> A separate package for main pages.
                   |
                   +--- {Main}Activity.java -> {Main}Activity.
                   |
                   +--- {Main}Prsenter.java -> The corresponding Presenter for {Main}Activity.
                   |
                   +--- {Main}Contract.java -> The contract class for {Main}Activity.
                   |
                   +--- adapter/ -> Adapters for {Main}Activity.
                   |
                   +--- view/ -> View modules for {Main}Activity.
                   |
                   +--- vo/ -> View Objects for {Main}Activity.



provider(the `model` layer in `MVP`, provider logic and data for app):
/com/your/packages/provider/
    |
    +--- bll/ -> Business logic layer.
    |     |
    |     +--- application/ -> App application wrapper for provider.
    |     |         |
    |     |         +--- configuration/
    |     |                    |
    |     |                    +--- ProviderSchedulers -> Schedulers of RxJava in Model layer.
    |     |                    |
    |     |                    +--- network/
    |     |                          |
    |     |                          +--- interceptor/ -> Interceptors, such as add default common parameters for each request, parameters sign, encryption, login token status time out...
    |     |
    |     |
    |     +--- inject/ -> DI configuration, inject dependencies from dal(data access layer).
    |     |
    |     +--- interactor/ -> Interactors exposed to the presenter layer.
    |     |        |
    |     |        +--- cache -> Caches, such as login status cache.
    |     |        |
    |     |        +--- comb/ -> Model wrapper for presenter layer.
    |     |        |
    |     |        +--- rxevents/ -> Events for rxbus.
    |     |
    |     |
    |     +--- bo/ -> business objects.
    |
    +--- dal/ -> Data access layer.
          |
          +--- db/ -> Database access data source.
          |     |
          |     +--- model/ -> Persistence layer objects, mapping to tables.
          |     |
          |     +--- helper/ -> DatabaseOpenHelper for android sqlite.
          |     |
          |     +--- dao/ -> Database access objects.
          |
          +--- file/ -> File access data source.
          |     |
          |     +--- FileRespository -> File storage respository.
          |
          +--- net/ -> Network access data source.
          |     |
          |     +--- http/ -> Http network.
          |           |
          |           +--- response/ -> Response class for all request.
          |           |
          |           +--- webapi/ -> All request urls.
          |
          |
          +--- prefs/ -> SharedPreference access data source.
          |     |
          |     +--- PrefsConstants -> Shared preference keys.
          |     |
          |     +--- PrefsRespository -> Shared preference access objects.
          |
          +--- ...



..../support/ -> Support module
       |
       +--- bridge/ -> Compatible with unit testing, thread scheduling bridge.
       |
       +--- func/ -> Function interface definition.
       |
       +--- rxbus/ -> Event bus implementation base on RxJava.
       |
       +--- usage/ -> Usage utils, such as `XLazy`.
       |
       +--- xlog/ -> Log utils, Compatible with unit testing base JVM on PC.

About

Clean Android Project Example (MVP).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages