ListView Activity, fill space

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

ListView Activity, fill space

Postby Ventrix » Mon Apr 27, 2009 4:12 pm

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. ?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout android:id="@+id/VoicemailLayout"
  3.         xmlns:android="http://schemas.android.com/apk/res/android"
  4.         android:layout_width="fill_parent" android:layout_height="fill_parent"
  5.         android:orientation="vertical">
  6.  
  7.         <TextView android:layout_width="fill_parent"
  8.                 android:layout_height="wrap_content" android:text="List:"
  9.                 android:textSize="20sp" android:textStyle="bold" android:layout_gravity="top">
  10.         </TextView>
  11.  
  12.                 <LinearLayout android:id="@+id/linearMain"
  13.                         android:layout_width="fill_parent" android:layout_height="wrap_content"
  14.                         android:orientation="vertical">
  15.                         <ListView android:id="@android:id/list"
  16.                                 android:layout_width="wrap_content" android:layout_height="wrap_content">
  17.                         </ListView>
  18.                 </LinearLayout>
  19.  
  20.         <Button android:id="@+id/onlinerButton1" android:layout_width="fill_parent"
  21.                 android:layout_height="wrap_content" android:layout_gravity="bottom">
  22.         </Button>
  23. </LinearLayout>
Parsed in 0.004 seconds, using GeSHi 1.0.8.4


I have this xml layout for a ListActivity.

The problem is that the ListView does not fill the free space between the TextView and the Button.

I would like it to be like this:
Code: Select all
|-------------------------|
|          ListName        |
|-------------------------|
|          ListItem          |
|          ListItem          |
|          ListItem          |
|       [free space]       |
|       [free space]       |
|       [free space]       |
|-------------------------|
|            Button          |
|-------------------------|


Any suggestions please?
http://www.androidgreece.gr - Greek Android Community
User avatar
Ventrix
Junior Developer
Junior Developer
 
Posts: 11
Joined: Tue Mar 04, 2008 11:47 pm
Location: Greece

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Majestic-12 [Bot] and 3 guests