Ich setze das minimierende Symbolleisten-Layout ein. Ich habe den Parallax-Modus für das relative Layout unterhalb der Werkzeugleiste eingestellt.Der Parallax-Modus funktioniert nicht beim Minimieren des Symbolleisten-Layouts
Aber es wird nicht verblassen, wenn ich die Symbolleiste nach oben scrollen. Ich zeige nur das relative Layout über dem Titel der Symbolleiste. Es wird mit der Symbolleiste zusammengeführt.
Haben alle Modi noch eingestellt es wird zusammengeführt.
Layout:
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="160dp"
android:id="@+id/appbar"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:fitsSystemWindows="true">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
app:contentScrim="?attr/colorPrimary"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:titleEnabled="false">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"/>
<RelativeLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="30dp"
app:layout_collapseMode="parallax"
android:layout_gravity="bottom"
android:layout_marginBottom="10dp"
app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed">
<TextView
android:id="@+id/eventName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="Event Name"
android:textColor="#ffffff"
android:textSize="14sp"/>
<TextView
android:id="@+id/date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/eventName"
android:layout_marginTop="10dp"
android:text="Date"
android:textColor="#ffffff"
android:textSize="14sp"/>
<TextView
android:id="@+id/time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/date"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:text="Time"
android:textColor="#ffffff"
android:textSize="14sp"/>
</RelativeLayout>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:id="@+id/scroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="false"
android:layout_alignParentStart="false"
android:layout_below="@+id/textView6"
android:layout_marginTop="20dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="PLAN"
android:layout_centerHorizontal="true"
android:textAppearance="@android:style/TextAppearance.Large"
android:id="@+id/textView6"
android:layout_marginTop="10dp"
android:layout_gravity="center_horizontal" />
<Button
android:layout_width="150dp"
android:layout_height="40dp"
style="?android:attr/borderlessButtonStyle"
android:text="Schedule"
android:id="@+id/schedule"
android:layout_gravity="center_horizontal"
android:background="@drawable/list_background"
android:layout_marginTop="20dp" />
<Button
android:layout_width="150dp"
android:layout_height="40dp"
style="?android:attr/borderlessButtonStyle"
android:text="Check List"
android:id="@+id/button4"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:background="@drawable/list_background" />
<Button
android:layout_width="150dp"
android:layout_height="40dp"
android:text="Vendors"
style="?android:attr/borderlessButtonStyle"
android:id="@+id/button5"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:background="@drawable/list_background" />
<Button
android:layout_width="150dp"
android:layout_height="40dp"
android:text="Invitee"
style="?android:attr/borderlessButtonStyle"
android:id="@+id/button6"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:background="@drawable/list_background" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
wie folgt aussieht nach dem Scrollen nach oben:
Was ist los?
Bitte Danke helfen ..
hinzufügen _CoordinatorLayout_ als Eltern-Layout. – Piyush
Können Sie Bildschirm teilen. –
Ich habe das Layout des Koordinators als übergeordnetes Layout hinzugefügt, weiß nicht, warum es keinen Beitrag erhält @PiyushGupta –