I have the following code in an Activity that starts a dialog for a layout that contains a fragment.
...
case R.id.pick_resource:
dialog = new Dialo
Maybe this can help someone:
I use the code of Эвансгелист Evansgelist, but with a DialogFragment that has a layout with a MapFragment, the code have to be onDestroy block:
@Override
public void onDestroy(){
super.onDestroy();
FragmentTransaction ft2 = getActivity().getFragmentManager()
.beginTransaction();
ft2.remove( getFragmentManager()
.findFragmentById(R.id.map_map));
ft2.commit();
}
This is my layout: