jeudi 5 mai 2016

Synchronise data across multiple activities/fragments

I have three components whose data I have to synchronise.

  1. Activity - This activity get data from Content Provider and has a ViewPager. It passes this data (Fragment.getInstance(data...)) to the second component which is a Fragment

  2. Fragment - This fragment has a RecyclerView and onClick() of a particular item, data is passed through intent to the third component which is an Activity.

  3. Activity - Here the data which is received is modified.

What would be the best way to sync this modification across all the three components?

Aucun commentaire:

Enregistrer un commentaire