沉浸式状态栏实现起来的文章网上有很多了,不过再MD中有一个图片和toolbar一起使用,还会产生过度效果的沉浸式状态栏,像下面这样
标题栏XML代码如下
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="192dp"
android:fitsSystemWindows="true">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/notification_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:contentScrim="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed"
android:fitsSystemWindows="true"
app:layout_scrollInterpolator="@android:anim/decelerate_interpolator"
app:toolbarId="@+id/toolbar">
<ImageView
android:id="@+id/app_bar_image"
android:layout_width=