So I have a layout that contains a ListView...and underneath the ListView I have various other elements...my problem is that if the ListView gets a lot of elements, then the elements from the bottom disapear from the screen....How can i solve this?
My layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/header"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true">
<TextView android:id="@+id/name_header"
android:textSize="18sp"
android:textStyle="bold"
android:layout_marginLeft="10sp"
android:layout_marginTop="5sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.6"
android:text="@string/product"
/>
<TextView android:id="@+id/quantity_header"
android:textSize="18sp"
android:textStyle="bold"
android:layout_marginTop="5sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.2"
android:text="@string/quantity"
android:gravity="center"
/>
<TextView android:id="@+id/total_price_header"
android:textSize="18sp"
android:textStyle="bold"
android:layout_marginTop="5sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.2"
android:text="@string/price"
android:gravity="center"
/>
</LinearLayout>
<View android:id="@+id/line"
android:layout_width="match_parent"
android:layout_height="2dip"
android:background="#FF0000"
android:layout_below="@+id/header"
/>
<ListView
android:id="@+id/listViewOrder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/line"
android:layout_marginTop="10sp"
android:layout_centerHorizontal="true" >
</ListView>
<View android:id="@+id/line2"
android:layout_width="match_parent"
android:layout_height="2dip"
android:background="#FF0000"
android:layout_marginTop="10sp"
android:layout_below="@+id/listViewOrder"
/>
<TextView android:id="@+id/total_cost"
android:textSize="18sp"
android:textStyle="bold"
android:layout_marginTop="5sp"
android:layout_marginBottom="15sp"
android:layout_marginRight="5sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_below="@+id/line2"
/>
<RadioGroup android:id="@+id/radio"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_below="@+id/total_cost">
<RadioButton android:id="@+id/radio_home"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/radio_home"
android:layout_marginRight="20sp"
android:onClick="onRadioButtonClicked"
/>
<RadioButton android:id="@+id/radio_work"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/radio_work"
android:onClick="onRadioButtonClicked"
/>
</RadioGroup>
</RelativeLayout>
Thanks
EDIT : The problem was in my approach..what I needed was a TableLayout...and the element outside to be a ScrollView