Strange behavior with coordinator layout and collapsing toolbar with overlapped content
<p>I'm trying to get some details from my movie page to overlap the toolbar but several corner cases keep causing the overlapped content to phase underneath the middle of the toolbar. The latest case that causes this is showing a snackbar. Any information would be helpful because, so far, the overlapTop behavior has been very buggy and aggravating to work with.</p>

<p>Edit: I also use appBarLayout.setExpanded to expand it every time I load a new movie. Not sure if that is important.</p>

<p><a href="https://i.stack.imgur.com/YT3As.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YT3As.jpg" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/vP4iR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vP4iR.png" alt="enter image description here"></a></p>

<p>Home layout:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;android.support.v4.widget.DrawerLayout
    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:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:context=".ui.home.HomeActivity"&gt;

    &lt;android.support.design.widget.CoordinatorLayout
        android:id="@+id/coordinator"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true"&gt;

        &lt;android.support.design.widget.AppBarLayout
            android:id="@+id/appBar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fitsSystemWindows="true"&gt;

            &lt;android.support.design.widget.CollapsingToolbarLayout
                android:id="@+id/collapsingToolbar"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                app:layout_scrollFlags="scroll|exitUntilCollapsed"
                app:contentScrim="?attr/colorPrimary"
                app:titleEnabled="false"
                android:fitsSystemWindows="true"&gt;

                &lt;ImageView
                    android:id="@+id/backdrop"
                    android:layout_width="match_parent"
                    android:layout_height="200dp"
                    android:alpha="0.5"
                    android:contentDescription="@string/backdrop"
                    android:scaleType="centerCrop"
                    android:fitsSystemWindows="true"
                    app:layout_collapseMode="parallax" /&gt;

                &lt;android.support.v7.widget.Toolbar
                    android:id="@+id/toolbar"
                    android:layout_width="match_parent"
                    android:layout_height="?attr/actionBarSize"
                    app:layout_collapseMode="pin"/&gt;
            &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
        &lt;/android.support.design.widget.AppBarLayout&gt;

        &lt;FrameLayout
            android:id="@+id/frame"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:clipToPadding="false"
            app:layout_behavior="@string/scrolling_view"
            app:behavior_overlapTop="80dp"
            /&gt;

        &lt;android.support.design.widget.FloatingActionButton
            android:id="@+id/fab"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="16dp"
            android:src="@drawable/ic_dice_three_48dp"
            app:layout_anchor="@+id/frame"
            app:layout_anchorGravity="bottom|end"
            /&gt;
    &lt;/android.support.design.widget.CoordinatorLayout&gt;

    &lt;android.support.design.widget.NavigationView
        android:id="@+id/navigation_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        app:menu="@menu/menu_home_nav"/&gt;
&lt;/android.support.v4.widget.DrawerLayout&gt;
</code></pre>

<p>Movie layout:</p>

<pre><code>&lt;android.support.v4.widget.NestedScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/nested_scroll_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:overScrollMode="never"
    tools:targetApi="lollipop"
    tools:ignore="RtlSymmetry"&gt;

    &lt;FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"&gt;

        &lt;RelativeLayout
            android:id="@+id/content"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:paddingTop="16dp"
            android:visibility="visible"&gt;

            &lt;ImageView
                android:id="@+id/poster"
                android:layout_width="98dp"
                android:layout_height="140dp"
                android:layout_marginStart="16dp"
                android:layout_marginEnd="16dp"
                android:contentDescription="@string/poster"
                tools:background="@color/md_white_1000"
                /&gt;

            &lt;TextView
                android:id="@+id/title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_toEndOf="@+id/poster"
                android:layout_above="@+id/phrase"
                android:layout_marginStart="16dp"
                android:layout_marginEnd="16dp"
                android:gravity="bottom"
                android:textColor="?attr/titleTextColor"
                android:textSize="24sp"
                android:textStyle="bold"
                android:fontFamily="sans-serif-condensed"
                tools:text="Title"/&gt;

            &lt;TextView
                android:id="@+id/phrase"
                android:layout_width="match_parent"
                android:layout_height="80dp"
                android:layout_marginStart="16dp"
                android:layout_marginEnd="16dp"
                android:layout_toEndOf="@+id/poster"
                android:layout_alignBottom="@+id/poster"
                android:paddingTop="16dp"
                android:gravity="top"
                android:textSize="18sp"
                android:textStyle="italic|bold"
                android:fontFamily="sans-serif-condensed"
                tools:text="Good vs Evil" /&gt;

            &lt;FrameLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="140dp"&gt;

                &lt;include layout="@layout/card_movie" /&gt;
            &lt;/FrameLayout&gt;

        &lt;/RelativeLayout&gt;

        &lt;android.support.v4.widget.ContentLoadingProgressBar
            android:id="@+id/loading"
            style="?android:progressBarStyle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:progressBackgroundTint="@color/md_white_1000"
            android:padding="32dp"
            android:visibility="invisible"
            tools:targetApi="lollipop" /&gt;

        &lt;RelativeLayout
            android:id="@+id/error"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:visibility="invisible"&gt;

            &lt;TextView
                android:id="@+id/error_message"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:padding="32dp"
                /&gt;

            &lt;Button
                android:id="@+id/error_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/error_message"
                android:layout_centerHorizontal="true"
                android:text="@string/recycle"/&gt;
        &lt;/RelativeLayout&gt;

    &lt;/FrameLayout&gt;

&lt;/android.support.v4.widget.NestedScrollView&gt;
</code></pre>