Here I little confuse with Fragments,
I create a one Activity-'A'. Add Fragment-'X' in Activity. Replace Fragment-'Y' in place of Fragment-'X' Now i want to open Fragment-'X' with saved state in Activity-'A'.
Please help me,
Thanks in Advance.
Here I little confuse with Fragments,
I create a one Activity-'A'. Add Fragment-'X' in Activity. Replace Fragment-'Y' in place of Fragment-'X' Now i want to open Fragment-'X' with saved state in Activity-'A'.
Please help me,
Thanks in Advance.
 
    
    Use  in onBackPressed()
FragmentManager fm = getActivity().getSupportFragmentManager();
            fm.popBackStack();
and for more details check link!!!
 
    
     
    
        To open fragment x from fragment y use the code....
getActivity().getSupportFragmentManager().popBackStack();
