THE PROBLEM:
I have one activity with 2 fragment: Fragment1 and Fragment2.
After click one item from my RecyclerView I call Fragment2 with the following line:
fragmentTransaction.add(R.id.frmFragmentItem,detailsFragment);
When the user closes Fragment2 (BackButton or Close button), Fragment1 appears again on the screen.
WHAT I NEED:
Which is the event that is called when the instance of Fragment1 appears again in the screen?
After revise the following life cycle of the fragment, I thought that may be was onCreateView() or onResume() but is not (because the breakpoint didn't stop).
THE QUESTION:
So, could you tell me which event is called when Fragment1 appears again the screen (The instance of the fragment has already created)
ANOTHER POSSIBILITY?
Also I thought to use startActivityForResult & onActivityResult, but I don't know how to use it if I call Fragment2 with the following lines:
Fragment2 detailsFragment = new Fragment2 ();
android.support.v4.app.FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.add(R.id.frmFragmentItem,detailsFragment);
fragmentTransaction.commit();
Thanks.