I have a scrollview that contains a section for an address, some buttons, and a map that I want to be displayed in the following format:
Here is the result I get instead:
For some strange reason I can't force the MapFragment to respect the matchparent
attribute and it always turns out to be a specific default height. Here's the basic XML:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/tile_view"
android:orientation="vertical"
android:padding="10dp">
<!-- Address -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/agencyAddress"/>
<!-- Map and Buttons -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:paddingTop="5dp">
<!-- Map -->
<fragment
android:id="@+id/agency_map"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_toRightOf="@+id/buttons"
android:layout_toEndOf="@+id/buttons"
class="com.google.android.gms.maps.MapFragment" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/buttons"
android:orientation="vertical">
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/random_image"
android:src="@drawable/random_image"/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/random_image2"
android:src="@drawable/random_image"/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>