I need to insert SupportMapFragment in Dialog . This is the best I could think of:
public class SupportMapFragmentDialog extends DialogFragment { private final SupportMapFragment fragment; public SupportMapFragmentDialog() { fragment = new SupportMapFragment(); setTargetFragment(fragment, 1); } @Override public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) { return fragment.onCreateView(inflater, container, savedInstanceState); } public SupportMapFragment getFragment() { return fragment; } }
However, when I call it:
final SupportMapFragmentDialog dialog = new SupportMapFragmentDialog(); dialog.show(getSupportFragmentManager(), "Historico");
I get this:

What can I do to see the map in the dialog?
There is another SupportMapFragment in the application that works wonders, so it has nothing to do with configuration.
source share