Я использую макет Координатора в макете ограничений и макете панели приложений вместе с CollapsingToolbarLayout, все работает нормально, кроме атрибута contentScrim.Это не работает так, как задумано.Когда я прокручиваю вверх, изображение все еще отображается на панели инструментов вместо того, чтобы показывать мой цвет.
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ProfileActivity">
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/myCollapse"
app:title="Fizan"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/mToolbar"
app:contentScrim="?android:attr/colorPrimary"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<android.support.v7.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:theme="@style/mToolbar"
app:layout_collapseMode="pin" />
<ImageView
android:layout_width="match_parent"
android:layout_height="200dp"
android:src="@drawable/profile"
app:layout_collapseMode="parallax" />
</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"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="jdkhasjkdajksdhjkashdjkhsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsahsak"
android:textSize="35dp" />
</android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout>
</android.support.constraint.ConstraintLayout>