title: SupportMapFragment on DialogFragment
body: <p>I need to embed a<code>SupportMapFragment</code>in a<code>Dialog</code>. This is the best I could think of:</p>
  
  <pre><code>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;
      }
  
  }
  </code></pre>
  
  <p>However, when I call this:</p>
  
  <pre><code>final SupportMapFragmentDialog dialog = new SupportMapFragmentDialog();
  dialog.show(getSupportFragmentManager(), "Historico");
  </code></pre>
  
  <p>I get this:</p>
  
  <p><img src="https://i.stack.imgur.com/HFEAo.png" alt="enter image description here"></p>
  
  <p>What can I do to see the map on the Dialog?</p>
  
  <p>The app has another <code>SupportMapFragment</code> that is working wonders, so it doesn't have anything to do with the configuration.</p>