I have a scenario that i have one activity and 4 fragment , from one of the fragment i am passing the data using interface to the main activity , I am receiving the value or say object , now what i need to do , i have to pass the same object to all other fragment . but i don't wanna to use bundle or static method/field , I just want to know the best idea or approach to this question , what i can do ?
One solution i am thinking using the abstract class , Let's say my abstract class name is ParentFragmentAbstarct should implements the Fragment class and define a abstract method inside it let say setData(), then every Fragment should extends this Fragment class then abstract method is overridden in every fragment , now i am lost , how to set the value in it if i am getting the value only from one of the fragment(let's say from network response i am receiving the data in Fragment 2 n now how to set this same value in other three fragment)