I would like to put transparent (map visible under it) button over mapview? How can i achieve that?
Asked
Active
Viewed 1,360 times
2 Answers
1
Try using this on the button android:background="@null" or android:background="@android:color/transparent" EDIT: to place over use a relative layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.maps.MapView android:id="@+id/google_maps"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="@string/maps_key"/>
<Button android:id="@+id/googlemaps_select_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:text="Select"/>
</RelativeLayout>

SquiresSquire
- 2,404
- 4
- 23
- 39
0
You could wrap the map in a FrameLayout or something. Then add a button to the FrameLayout and use android:layout_alignParentRight="true"
for Right, Left, Top and Bottom. The button will then align it's edges with the edges of the FrameLayout, which should be wrapping the map.

Mike T
- 4,747
- 4
- 32
- 52