关于布局的问题 有人知道这样的布局如何实现,要能自动适配屏幕的。也就是顶部固定高度的LinearLayout,底部是一个LinearLayout,中间的ScrollView高度是自动适配的,就是中间的那个属性该要怎么设置?想了好久没有想出来。有做UI的大侠知道一下嘛? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?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"> <LinearLayout android:id="@+id/top" android:background="#ff303030" android:layout_width="fill_parent" android:layout_height="50dp"></LinearLayout><LinearLayout android:id="@+id/bottom" android:background="#ff303030" android:layout_width="fill_parent" android:layout_height="50dp" android:layout_alignParentBottom="true"></LinearLayout><ScrollView android:id="@+id/center" android:background="#ffa0a0a0" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_below="@+id/top" android:layout_above="@+id/bottom" ></ScrollView></RelativeLayout>试试这个,是否符合需要~~ 中间的布局 加一个比重试试 android:layout_weight="1" 这个肯定不行,上下在不同长宽比例的屏幕下,上下两部分的LinearLayout高度是变化的。 如何能彻底退出程序 关闭所有acitiviy 并自动关闭程序监听 android 窗体如何刷新 使用Android NDK编译程序问题 查看一个界面类与类之间的继承关系的命令是什么? 关于eclipse无法启动 已经解决 求大神,ZXing编解码算法 asmack 要怎么实现文件传输?? android手机开启gprs数据连接的时候还能用wifi传文件么? LocationManager.NETWORK_PROVIDER得不到位置信息 小白求问?如何在Android Studio上利用云数据库Mysql实现在线登录注册? 如何用微博账号登陆自己开发的应用 android中可以增删条目的控件
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout
android:id="@+id/top"
android:background="#ff303030"
android:layout_width="fill_parent"
android:layout_height="50dp">
</LinearLayout><LinearLayout
android:id="@+id/bottom"
android:background="#ff303030"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true">
</LinearLayout>
<ScrollView
android:id="@+id/center"
android:background="#ffa0a0a0"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/top"
android:layout_above="@+id/bottom"
></ScrollView>
</RelativeLayout>试试这个,是否符合需要~~