正如我在标题上所解释的那样,如果我在向下拉动后立即从下往上快速滚动,在折叠的工具栏上滚动停止.我希望它能够扩展.如果我顺畅地拉动nestedscrollview,没有问题,工具栏会正确扩展.我在nestedscrollview中有recycleler视图.这是我的布局
<android.support.design.widget.CoordinatorLayout
android:id="@+id/detail_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
>
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="160dp"
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
>
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.AppCompat.Dark"
app:contentScrim="?attr/colorPrimary"
app:expandedTitleMarginEnd="@dimen/article_keylines"
app:expandedTitleMarginStart="@dimen/md_keylines"
app:expandedTitleMarginBottom="@dimen/article_keylines"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:expandedTitleTextAppearance="@dimen/tile_padding"
>
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/a"
android:fitsSystemWindows="true"
android:foreground="@drawable/scrim_profile"
android:scaleType="centerCrop"
app:layout_collapseMode="parallax" />
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
android:elevation="4dp"
app:layout_scrollFlags="scroll|enterAlways|snap"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/nestedscrollview"
android:background="@color/background"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<RelativeLayout
android:id="@+id/inner_relativeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/md_keylines"
android:paddingRight="@dimen/md_keylines"
android:background="@color/white"
android:paddingBottom="@dimen/article_keylines"
android:paddingTop="@dimen/article_keylines"
android:focusableInTouchMode="true"
>
<TextView
android:id="@+id/tw1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text"
android:textSize="16sp"
android:lineSpacingExtra="4sp"
android:text="Text"
android:layout_marginBottom="@dimen/md_keylines"/>
<View …Run Code Online (Sandbox Code Playgroud) android scroll android-coordinatorlayout android-collapsingtoolbarlayout android-nestedscrollview