嵌入android应用程序的谷歌地图
嗨,我想在我的应用程序中使用谷歌地图,但我也想为它创建自己的页脚菜单。所以从上到下它应该看起来像页眉-谷歌地图-页脚。我尝试将relativeLayout和linearLayout添加到mapview的embed中,但没有实现嵌入android应用程序的谷歌地图,android,google-maps,Android,Google Maps,嗨,我想在我的应用程序中使用谷歌地图,但我也想为它创建自己的页脚菜单。所以从上到下它应该看起来像页眉-谷歌地图-页脚。我尝试将relativeLayout和linearLayout添加到mapview的embed中,但没有实现 你能给我举个例子或告诉我一些方法吗 读取布局权重- 如果有三个视图,并将权重设置为0、1和0,则中间的视图将调整大小,其他两个视图将保持固定大小,因此这是向调整大小的视图添加页眉和页脚的好方法。尝试此模板代码,并注意如何设置布局权重: <?xml version="
你能给我举个例子或告诉我一些方法吗 读取布局权重- 如果有三个视图,并将权重设置为0、1和0,则中间的视图将调整大小,其他两个视图将保持固定大小,因此这是向调整大小的视图添加页眉和页脚的好方法。尝试此模板代码,并注意如何设置布局权重:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- Header -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
/>
<!-- Map -->
<MapView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
....
/>
<!-- Footer, or another embedded Layout -->
<ImageView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
/>
</LinearLayout>
首先感谢您的回复,效果非常好。而且我今天刚达到15名,所以从现在起我可以把答案打勾作为有用的:)