Я пытаюсь поместить кнопку в нижней части моего макета. Вот что я сделал
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.google.android.maps.MapView
android:id="@+id/map" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:apiKey="mykey"
android:clickable="true" />
<Button android:id="@+id/button" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_alignParentBottom="true" />
</RelativeLayout>
Это работает достаточно хорошо, но кнопка накладывается поверх карты. Я хочу, чтобы mapview заканчивался прямо над кнопкой. Я думал, что могу просто установить mapview в layout_height = "wrap_content", но это не сработало.
Любые предложения?
По-видимому, мне просто нужно было добавить это в свой MapView:
android:layout_above="@+id/button"
android:layout_alignParentTop="true"
jst добавить код: андроид: layout_alignParentTop = "истина"