Ich habe für Android-Apps mit RecycleView entwickelt. Ich frage mich, wie kann ich ein komplettes Layout an meine RecyclerView "anhängen", so dass wenn ich nach unten scrolle das Layout mit ihm außer Sichtweite scrollt. Derzeit ist das Layout oberhalb der RecyclerView auf dem Bildschirm fixiert, während alle Daten in meiner RecyclerView scrollbar sind. Ich möchte, dass sich das Layout außer Sichtweite bewegt, wenn der Benutzer die Seite herunterscrollt. Wenn Sie sich Instagram ansehen, werden alle Benutzerprofilinformationen oben in der Galerie beim Scrollen auf der Seite ausgeblendet. Wie kann ich das machen? Wie kann ich das gesamte Layout scrollen und den Scroll von Recycleview deaktivieren?Wie man das Top-Layout verschwinden lässt, wenn man im Recycleview scrollt
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:paddingLeft="15dp"
android:paddingBottom="0dp"
android:textSize="14sp"
android:fontFamily="sans-serif-light"
android:textStyle="bold"
android:typeface="sans"
android:id="@+id/fullName"
android:paddingTop="10dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:gravity="top"
android:paddingLeft="15dp"
android:paddingBottom="0dp"
android:textSize="14sp"
android:fontFamily="sans-serif-light"
android:typeface="sans"
android:id="@+id/bio"
android:paddingRight="15dp" />
</LinearLayout>
<android.support.v7.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginBottom="?android:attr/actionBarSize"
android:padding="@dimen/item_margin"
android:id="@+id/recycler_view"
android:clipToPadding="false"
android:visibility="visible"/>
Was Sie beschreiben, mit dem Einsatz des neuen 'coordinatorLayout' sehr leicht erreicht werden kann. Beispiele finden Sie überall im Internet, hier ist eine ziemlich gute aber: http://saulmm.github.io/mastering-koordinator – NSimon