Ich mag würde eine zwei Schichten überlappenden Scroll-Layout wie Airbnb Zimmer Detail Layout haben
Airbnb Scrollen wie überlappende: Android zwei Schichten überlappenden Scroll-Layout wie Airbnb Zimmer Detail Layout
Aber meine XML-Layout-Datei gibt das folgende Ergebnis aus:
Hier ist mein Layout-Code:
<android.support.design.widget.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<ImageView
android:id="@+id/backdrop"
android:layout_width="match_parent"
android:layout_height="280dp"
android:fitsSystemWindows="true"
android:scaleType="centerCrop"
android:src="@drawable/height_360_2" />
</android.support.design.widget.AppBarLayout>
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="always">
<android.support.v7.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:cardElevation="8dp"
app:contentPadding="16dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:lineSpacingExtra="8dp"
android:text="@string/person_intro" />
</android.support.v7.widget.CardView>
</android.support.v4.widget.NestedScrollView>
</FrameLayout>
Diese beiden mir sehr ähnlich zu sein scheinen. Unterschied, den ich sehe, ist, dass dein ganz bis zur Spitze geht, ey? Versuchen Sie, marginTop = "50dp" hinzuzufügen und sehen Sie, ob sich etwas ändert. – Vucko
@Vucko danke. schön, funktioniert es jetzt mit dem Hinzufügen von MarginTop in Cardview –
shortstopmin
Cool, dann werde ich meinen Kommentar auf die Antwort verschieben, damit Sie mich durch Annahme annehmen können. Kein Problem :) – Vucko