我有一个RelativeLayout,这个布局有两个孩子,一个是a MapView,另一个是RelativeLayout包含一个按钮.
我希望它看起来像那样

但我的透明框(a RelativeLayout)始终显示在地图的顶部.
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<com.google.android.maps.MapView
android:id="@+id/mapView"/>
<test.project.TransparentPanel
android:layout_width="fill_parent"
android:layout_width="fill_parent">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Click Me!"/>
</test.project.TransparentPanel>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
(我在代码中遗漏了一些东西)