0

enter image description here

I have added di out of mvp because I am thinking that "di as global which I will use in model/presenter/view packages."

Misha Akopov
  • 12,241
  • 27
  • 68
  • 82
Tushar Pandey
  • 4,557
  • 4
  • 33
  • 50
  • 1
    take a look at these: https://stackoverflow.com/questions/37664828/android-mvp-pattern-package-structure https://stackoverflow.com/questions/47505865/best-practice-for-package-structure-in-an-mvp-project – Umair Jan 01 '18 at 09:16

1 Answers1

1

For small projects with limited source code the structure which you shared is fine. Since if any issue comes then you can directly go to perticular folder to identify/fix the issue.

I would recommend for big project having multiple java files then instead of creating model, presenter, view folders go for module wise folder sturcuture.

e.g. If project contains phone contact module then your folder structure should be > Contact

  • ContactActivity
  • ContactContract
  • ContactPresenter

This way you can manage your MVP pattern more easily and runtime if any issues will come then you will go to respected modules and would be easy to drill down under that module.

Hope this is helpful...

Nikhil Lotke
  • 605
  • 7
  • 15