Files structure in MVVM (Android)

Google in it's sample Android Architecture project uses Model(Data) V(views) VM(view-models) file structure Google sample sunflower app to show architecture components Probably that's the best approach enter image description here


Additionnaly you may find this resource interesting https://overflow.buffer.com/2016/09/26/android-rethinking-package-structure/ An implementation is visible here https://github.com/SamYStudiO/beaver


If you want to go by the book, the current "correct" way to implement MVVM in Android is the Android Architecture Components set of libraries.

Read more about it here, and try this code lab. These will also show you how to name and place your classes.

But in general, you should go with what matches your app best. For smaller apps I would recommend going with M V P folders, while for bigger, more long-term ones tend to work better with folder-per-feature structure.