如何解决底部带有按钮的MapView
| 我正在尝试在布局的底部放置一个按钮。这是我所做的<?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:id=\"@+id/map\" android:layout_width=\"fill_parent\"
android:layout_height=\"wrap_content\" android:apiKey=\"mykey\"
android:clickable=\"true\" />
<Button android:id=\"@+id/button\" android:layout_width=\"fill_parent\"
android:layout_height=\"wrap_content\" android:layout_alignParentBottom=\"true\" />
</RelativeLayout>
这已经足够好了,但是按钮被覆盖在地图视图的顶部。我希望mapview在按钮顶部结束。我以为我可以将mapview设置为layout_height = \“ wrap_content \”,但这没用。
有什么建议么?
解决方法
显然我只需要将此添加到我的MapView中:
android:layout_above=\"@+id/button\"
android:layout_alignParentTop=\"true\"
,jst添加代码:
android:layout_alignParentTop = \“ true \”
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。