Ich möchte eine Seite erstellen, die 3 Listen und 3 Header hat, aber ich möchte nicht unabhängig voneinander scrollen, möchte ich die ganze Seite scrollen. Weiß jemand, wie ich das erreichen könnte?Android mehrere Listenansichten, die nicht unabhängig scrollen
Grunde möchte ich es wie folgt aussehen:
header
smlheader
list
smlheader
list
smlheader
list
Mit diesem Code habe ich versucht, es zu erreichen, aber es ist nicht so gut.
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<TableLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/white">
<include layout="@layout/header" />
<include layout="@layout/redcell" />
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="60dp" >
<TextView
android:id="@+id/fixtures_text"
android:layout_width="match_parent"
android:layout_height="60dp"
android:gravity="center"
android:text="@string/leagues"
android:textColor="@color/white"
android:textSize="25dp"
android:textStyle="bold"/>
</TableRow>
<include layout="@layout/redcell" />
<TableRow
android:id="@+id/tableRow2"
android:layout_width="wrap_content"
android:layout_height="60dp" >
<TextView
android:id="@+id/results_text"
android:layout_width="match_parent"
android:layout_height="60dp"
android:gravity="center"
android:text="@string/leagues"
android:textColor="@color/white"
android:textSize="25dp"
android:textStyle="bold"/>
</TableRow>
<include layout="@layout/redcell" />
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</TableLayout>
<ScrollView/>
Werfen Sie einen Blick auf diese Antwort: http: // stackoverflow.com/a/1967010/1321873 – Rajesh
Ich bin unklar, was Sie wollen ... wollen Sie drei Listen nebeneinander, die zusammen scrollen, oder drei Listen, die ar sind vertikal ausgerichtet, aber als eine Liste scrollen? – Barak
Was hast du probiert? Ohne den Code zu sehen, den Sie verwendet haben, können wir Ihnen nicht helfen. – slayton