Reputation: 1306
i want to set button below google map means button should be on bottom of screen and google map till just above the button,i cant set the height in dip of google map because then it would create problem on large screen or small screen...and if i set height of googlemap=wrap_content then not able to see map in my layout then what should i do?my xml is below...
<?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:clickable="true"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/map"
android:enabled="true"
android:layout_below="@id/imv"
android:apiKey="xyz...."
/>
<Button
android:text="Map View"
android:id="@+id/button"
android:layout_width="fill_parent"
android:layout_height="30dip"
android:drawableTop="@drawable/icomapon"
android:background="@drawable/navigationbar"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
Upvotes: 1
Views: 1358
Reputation: 15269
Just add below tag in MapView
android:layout_above="@+id/button"
Upvotes: 3