2012-07-24 33 views

回答

1

尝试使用这个按钮 机器人:背景=“@空”或 机器人:背景=“@机器人:彩色/透明” 编辑: 放置在使用相对布局:

<?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> 
+0

好的thx,但问题是如何把它放在mapview上。 – DixieFlatline 2012-07-24 07:57:45

0

你可以将地图包装在FrameLayout或其他东西中。然后向FrameLayout添加一个按钮,并使用android:layout_alignParentRight="true"作为Right,Left,Top和Bottom。然后按钮将它的边缘与FrameLayout的边缘对齐,这应该包裹地图。