开发者

LinearLayour below ListView is not visible

Why is only the ListView visible?

<?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="wrap_content" >

<ListView android:id="@+id/android:list" android:layout_width="fill_parent"
    android:layout_height="wrap_content" android:layout_gravity="center" android:choiceMode="singleChoice">
</ListView> 


<LinearLayout android:orientation="horizontal"
    android:layout_width="fill_parent" android:layout_height="wrap_content"
      android:gravity="center"
    android:layout_marginTop="15dp"> 

    <Button android:id="@+id/viewComplaintsMoreButton"
        android:text="  More  "  
        android:layout_width="wrap_content" android:layout_height="wrap_content" />

开发者_如何学Go    <Button android:id="@+id/viewComplaintsCancelButton"
        android:text="  Cancel  "  
        android:layout_marginLeft="50dp" android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

</LinearLayout>

</LinearLayout> 


Try setting your ListView weight to 1

<ListView
     android:id="@+id/android:list"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:layout_gravity="center"
     android:choiceMode="singleChoice"
     android:layout_weight="1">
</ListView> 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜