Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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" />

    <Button android:id="@+id/viewComplaintsCancelButton"
        android:text="  Cancel  "  
        android:layout_marginLeft="50dp" android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

</LinearLayout>

</LinearLayout> 
like image 230
Santhosh Avatar asked Aug 31 '11 06:08

Santhosh


1 Answers

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> 
like image 157
Vladimir Avatar answered Nov 07 '22 00:11

Vladimir