Im trying to pass a variable back to a previous Fragment, similar to startActivityForResult but with Fragments, Is this possible?
The code I am using To call a Fragment is this:
FragmentFullScreen fragment = new FragmentFullScreen();
Bundle args = new Bundle();
args.putParcelable(ARG_VIDEO_SELECTED, mVideoSelected);
fragment.setArguments(args);
getFragmentManager().beginTransaction()
.replace(R.id.container, FragmentFullScreen.newInstance(mVideoSelected))
.addToBackStack("FragmentDetails")
.commit();
And then I using popBackStack to go to the previous Fragment:
getFragmentManager().popBackStack();
And there is when I want to update a Variable from the Previous Fragment.