samedi 3 février 2018

Android MVP pattern temporary data storage

I am working on an application in which different screens need to load data from API. Like there is a details screen that needs to load data from API on the basis of id passed to it. I am passing id to fragment in bundle created by newInstance method. I am implementing my app according to MVP pattern and am a bit confused that where should I store this id in view or presenter. I also need some temporary variables to keep track of whether data was loaded or not because I am loading data on onStart event on fragment

Aucun commentaire:

Enregistrer un commentaire