Ich habe ein Layout, das in zwei andere Layouts unterteilt ist: ein LinearLayout für den "Header" und ein RelativeLayout für den "Content".Scroll ListView statt seiner Items
Im Inhaltslayout habe ich ein ListView, das vergrößert werden muss, wenn der Benutzer scrollt, und dasselbe ListView hinter dem Header-Layout ausblenden. Grundsätzlich brauche ich so etwas wie diese:
Was wäre die beste aproach sein, so etwas zu tun? Das ist mein layout.xml jetzt:
<LinearLayout
android:id="@+id/layout_full"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background_base"
android:fitsSystemWindows="true"
android:orientation="vertical"
android:weightSum="1"
tools:context=".app.Main">
<!-- Header -->
<LinearLayout
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight=".55"
android:background="@drawable/background_header_small"
android:gravity="center_horizontal">
</LinearLayout>
<!-- Content -->
<RelativeLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight=".45">
<ListView
android:id="@+id/listview_full"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/text_add"
android:layout_alignEnd="@+id/text_add"
android:layout_alignStart="@+id/text_add"
android:divider="@null"
android:dividerHeight="0dp"
android:showDividers="none"
android:layout_marginBottom="10dp"
android:footerDividersEnabled="false"
android:layout_alignParentTop="true"
android:layout_marginTop="20dp" />
</RelativeLayout>
</LinearLayout>
Kann ich den Aufzug Komponente des Listview irgendwie entfernen, und blättern Sie in der Listview anstelle der Einzelteile innerhalb des Listview?