I have an issue with the Android layout.
I have some components (here a TableLayout and then a ListView). My scrollbar is associated only with the ListView and not the the TableLayout. As my TableLayout will become longer and in that case, my Listview will be unreadable.
How can I have a scrollbar for the whole page and not only for the ListView ?
My code :
<TableLayout
android:id="@+id/tableLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="77dp" >
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:layout_column="1"
android:text="@string/client"
android:width="100px" />
<TextView
android:id="@+id/client"
android:layout_column="2"
android:width="200px" />
</TableRow>
</TableLayout>
<ListView
android:id="@+id/lstPointsVerification"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true" >
</ListView>
Here is the code of each line of the ListView
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tvDate"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/ListePrincipal"
/>
How I correct that behaviour ?
Regards
You can do one thing that is create a seperate Layout for the
Headerpart that is the part above theListViewand add it to theListViewusingListView.addHeader(View);. So, in that case your Layout will scroll with theListView.