Davor Maric
05/28/2018, 6:09 PMand store the data in the activity
- you should probably avoid that:
1) Single responsibility principle - a class should have only a single responsibility. In your example, Activitys main responsibility is to keep view state rocking solid and to update fragments.
2) Seperation of Concerns - separating a computer program into distinct sections, such that each section addresses a separate concern. You don't want activity to manage something else than UI. View in MVP/MVVM is a passive (dumb) view. It doesn't know anything about the data
3) Memory allocation - Do not allocate any unecessary memory to app/ui layer. You app may bug and potentially experience an OOM Exception.