I'm using two fragments in my activity using ViewPager
and TabLayout
. I want to send and receive data between my Activity
and my Fragments
.
I don't prefer to use a class with static
variables to fix this problem. Is there a better way to do this task with out loosing much memory and resources. Because static data members never die in the whole life cycle of app. So they never release any chunk of memory. Which is a big problem for app to run in Samsung devices or you can say non rooted devices who restrict the usage of RAM.