我想做这样一个布局:上面是listview列表,屏幕底部是一个按钮。
现在出现的问题是:
当listview的内容很多的时候,下面的按钮就会挡住了listview屏幕的记录了
想要实现的效果是:让listview的所有内容都显示屏幕最下面的那个按钮之上、
该如何布局哦 谢谢大家了、
------解决方案--------------------
没看明白
------解决方案--------------------
设置下权重,weight 这个属性,在你的xml中
------解决方案--------------------
利用相对布局,
[code=XM] <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button
android:id="@+id/button"
style="?android:attr/buttonStyleSmall"
android:text="small"
android:layout_alignParentBottom="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ListView
android:id="@+id/main_list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@id/button" />
</RelativeLayout>[/code]