Collapsingtoolbarlayout не свернуть представление когда-нибудь, когда прокручиваем - PullRequest
0 голосов
/ 22 ноября 2018

есть два вида: View1 в свертываемом наборе инструментов и View2, содержащий recyclerView, но при прокрутке recyclerView вверх View1 не прокручивается вверх.иногда View1 прокручивается вверх, но не возвращается при прокрутке вниз.

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    style="@style/Widget.Design.CoordinatorLayout"
    >
    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/fullTransparent"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
        android:fitsSystemWindows="true">
    <android.support.design.widget.CollapsingToolbarLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_scrollFlags="scroll|exitUntilCollapsed"
        android:fitsSystemWindows="true"
        app:contentScrim="@color/fullTransparent"
        app:expandedTitleMarginStart="48dp"
        app:expandedTitleMarginEnd="64dp"
        >
    <include layout="@layout/content_featured_posts"
        app:layout_collapseMode="parallax"
        />
    </android.support.design.widget.CollapsingToolbarLayout>
    </android.support.design.widget.AppBarLayout>

    <android.support.v4.widget.SwipeRefreshLayout
        android:id="@+id/swipe_refresh"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        >
        <include layout="@layout/content_recent_posts" />
    </android.support.v4.widget.SwipeRefreshLayout>
    <include
        android:id="@+id/adsView"
        layout="@layout/content_banner_ad" />
    <include layout="@layout/view_common_loader" />

</android.support.design.widget.CoordinatorLayout>
...