vendredi 5 avril 2019

Android MVVM where to store data?

I have an activity with 4 fragments, on each of the fragments the user inputs a string and then moves on to the next one. So far I have a viewModel for every fragment and I pass each input as an argument that then I store in the viewModel.

My question is, should I just have a single viewModel where I store all of this inputs? Or is ok this way? Is there a better solution?

Aucun commentaire:

Enregistrer un commentaire