Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Sounds like you want something like this:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" &gt; &lt;fragment android:id="@+id/map_v2" android:layout_width="fill_parent" android:layout_height="fill_parent" class="com.google.android.gms.maps.MapFragment" /&gt; &lt;RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:padding="0px" &gt; &lt;!-- Lots of fancy layout --&gt; &lt;/RelativeLayout&gt; &lt;/RelativeLayout&gt; </code></pre> <p>And then in your SupportMapFragment something like this:</p> <pre><code>public class MyFragment extends Fragment { private SupportMapFragment fragment; private GoogleMap map; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.layout_with_map, container, false); } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); FragmentManager fm = getChildFragmentManager(); fragment = (SupportMapFragment) fm.findFragmentById(R.id.map); if (fragment == null) { fragment = SupportMapFragment.newInstance(); fm.beginTransaction().replace(R.id.map, fragment).commit(); } } @Override public void onResume() { super.onResume(); if (map == null) { map = fragment.getMap(); map.addMarker(new MarkerOptions().position(new LatLng(0, 0))); } } } </code></pre> <p>Also, worth mentioning... There appears to be a bug with reloading the fragment for a second time. This is something of a work around for the SupportMapFragment. See here: <a href="https://stackoverflow.com/questions/14565460/error-opening-supportmapfragment-for-second-time/15813151#15813151">The work around</a></p> <p>There is also a possible better fix to this here, but I haven't tried it yet: <a href="https://stackoverflow.com/questions/15207305/getting-the-error-java-lang-illegalstateexception-activity-has-been-destroyed/15656428#15656428">Option 2</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload