我有这样的布局
我希望按钮是一个固定的大小&分别锚定在屏幕的顶部和底部。我要把地图放在中间,把空间填满。
实现这一目标的最佳方法是什么?
谢谢
发布于 2011-03-31 06:54:50
使用垂直方向的LinearLayout,将Mapview的权重设为1
发布于 2011-03-31 06:58:06
像这样的事情应该能起作用:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button
android:id="@+id/button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"/>
<WhateveerMapLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@id/button"
android:layout_above="@+id/button2"
/>
<Button
android:id="@id/button2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
/>
</RelativeLayout>https://stackoverflow.com/questions/5496181
复制相似问题