How To Set Layout With Mapview
I have created the Application in which i m Using MapView. Now i want to Use the Back Button in My that MapView. I have develop the Layout but it cant seen the Button over mapview.
Solution 1:
Bo basically it may be possible with the overlays but I have done it using RelativeLayout stuff
<RelativeLayoutandroid:id="@+id/headerlayout"android:layout_width="fill_parent"android:layout_height="wrap_content"android:layout_alignParentTop="true"android:layout_alignParentLeft="true"
><Buttonandroid:id="@+id/amap_back_btn"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_alignParentTop="true"android:layout_alignParentLeft="true"android:text="Back"></Button></RelativeLayout><MapViewActivityxmlns:android="http://schemas.android.com/apk/res/android"android:id="@+id/mapview"android:layout_width="wrap_content"android:layout_height="wrap_content"android:clickable="true"android:apiKey="your map key"android:layout_below="@+id/headerlayout"android:layout_above="@+id/bottomlayout"
/>
This is all If you find it correct dont forget to mark my answer as check. Best Regards,Anup
Solution 2:
You will need to use an overlay to add the back button on the MapView. Have a look at this tutorial which explains on how to add overlays. http://www.anddev.org/viewtopic.php?t=92
Post a Comment for "How To Set Layout With Mapview"