UPDATE: Thanks everyone for your help, layout_weight is what I was after.
I am currently working on my first android project in java. I am trying to use a linearlayout which has a listview spanning most of the page but has a load more button at the bottom of the app.
This is what it SHOULD look like and is what is previewed to me in Eclipse
and this is what is happening when I actually run the application
The button for some reason is moved a lot higher then I would like, I would like it to stick to the bottom of the page and have the listview take up the rest of the screen...
Here is my layout xml...
<?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="fill_parent"
android:background="#000000">
<ListView
android:id="@+id/listview"
android:layout_width="fill_parent"
android:layout_height="434dp"
android:maxHeight="434dp"
android:minHeight="434dp"
android:background="#000000" >
</ListView>
<Button
android:id="@+id/button1"
style="?android:attr/buttonStyleSmall"
android:layout_width="fill_parent"
android:layout_height="27dp"
android:maxHeight="27dp"
android:text="Load More..."
android:textSize="@dimen/dp12" />
</LinearLayout>
So my question is,
What have I done wrong or not done at all which is required to keep the button at the bottom of the page?
Thanks.