In parent fragment:
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_parent, container, false);
//child fragment
FragmentManager childFragMan = getChildFragmentManager();
FragmentTransaction childFragTrans = childFragMan.beginTransaction();
ChildFragment childFragment = new ChildFragment ();
childFragTrans.add(R.id.FRAGMENT_CHILD, childFragment);
childFragTrans.commit();
Then in child fragment i need to get back to Parent fragment (hide child fragment) How to implement that ?