Android pop stack back recreate code example
Example: pop back stack fragment android
public void removeFragmentbyTag(String myFrag){
FragmentManager manager = getActivity().getSupportFragmentManager();
FragmentTransaction trans = manager.beginTransaction();
trans.remove(myFrag);
trans.commit();
manager.popBackStack();
}