A have a fragment (Fragment A) which gets a selected photo from a user. Once the user selects the photo in Fragment A I want to go to Fragment B and take the selected photo with me. I am also using viewpager so the user can swipe between the fragments…I want the user to be able to choose the photo and in the onActivityResult in Fragment A go to or start Fragment B. Is this possible?
Share
You will need to use a listener (ie. FragmentA.onFragmentBListener) to communicate between fragments.
In Fragment B, you will trigger an action, and listen for it in FragmentA (which can then act on the event, by starting, or doing anything).
Here is a good answer:
Android: correct way of jumping between fragments