2011-11-15 35 views

回答

3

对于这样的问题,您应该发布您的布局XML。一般来讲,如果你有一个的LinearLayout一个ListView,你可以权重设置为1(如果你有其他组件),或只是将高度设置为FILL_PARENT:

<ListView 
    android:layout_width="fill_parent" 
    android:layout_height="0dp" 
    android:layout_weight="1"/> 

<ListView 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"/> 
0

你可以在xml中右键点击ListView并设置宽度,设置任何你想要的高度..对于前20dp,300dp等 也可以像dmon建议的那样做。