I am trying to pass data between nested fragments in the following way:
From stored data in one class, I have loaded data into viewPager fragment (Fragment #1), displayed as such: Fragment#1
Now when the Btn is clicked, another fragment (Fragment#2), should launch with data that corresponds with Fragment#1, displayed as such: Fragment#2 The data for Fragment#2 is coming from Fragment#1, which is receiving the data from the class which has the stored data. Suppose there are multiple, Fragment#1 components in the same viewPager that have the Btn and when clicked would have to show Fragment#2 with data that are specific to each of the Fragment#1 components. What would be the best approach at trying to tackle this?
I have tried a similar approach, where instead of nested fragments, a fullscreendialog similar to Fragment#2 would appear. But that approach was futile since the dialogs could not properly keep track of the fragment position.