gpt4 book ai didi

android - MapView 如何填充一个完整的父容器?

转载 作者:太空狗 更新时间:2023-10-29 15:11:05 24 4
gpt4 key购买 nike

有如下简单布局:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<com.google.android.maps.MapView
android:id="@+id/activityMainPoints"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:apiKey="0JsSnv022MOCCXMAJfsQTVtfCiH37VG5XykFLmQ"
android:clickable="true" />

</RelativeLayout>

如您所见,MapView 必须填满整个父容器 RelativeLayout,但事实并非如此!我该如何解决?

最佳答案

android:layout_width="fill_parent"
android:layout_height="fill_parent"

关于android - MapView 如何填充一个完整的父容器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16276965/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com