私はこのレイアウトを持っています:それは下部にコンテナを備えたマップビューを持っているはずです、このコンテナは黄色の背景を持つ広告と2つのボタンを持っています。代わりに、画面の下部に広告と2つのボタンが表示されたコンテナだけが画面に表示されています。
xmlのルート:(どういうわけか、stackoverflowのルートが表示されません)
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
xmlns:map="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</RelativeLayout>
XML:
<RelativeLayout
android:id="@+id/bottomcontainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@color/yellow" >
<LinearLayout
android:id="@+id/action"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:layout_margin="0dp"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:padding="0dp" >
<Button
android:id="@+id/bt_map"
style="@style/ButtonLeft"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:enabled="false"
android:gravity="center"
android:minWidth="100dp"
android:padding="8dp"
android:text="Map" />
<Button
android:id="@+id/list"
style="@style/ButtonRight"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:gravity="center"
android:minWidth="100dp"
android:padding="8dp"
android:text="List" />
</LinearLayout>
<com.google.ads.AdView
android:id="@+id/adview"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_above="@id/action"
ads:adSize="BANNER"
ads:adUnitId="unitId"
ads:loadAdOnCreate="true" />
</RelativeLayout>
<com.google.android.gms.maps.MapView
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:apiKey="apikey"
android:clickable="true"
map:uiZoomControls="false"
android:layout_above="@id/bottomcontainer" >
</com.google.android.gms.maps.MapView>
<ImageButton
android:id="@+id/bt_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_margin="10dp"
android:src="@android:drawable/ic_menu_mylocation" />
<ListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/yellow"
android:layout_above="@id/bottomcontainer"
android:visibility="gone" >
</ListView>