<?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">

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_behavior="com.itant.behaviordemo.AppBarLayoutOverScrollViewBehavior">

        <android.support.design.widget.CollapsingToolbarLayout
            android:id="@+id/ctl_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:contentScrim="#FF078CDF"
            app:layout_scrollFlags="scroll|exitUntilCollapsed">

            <com.itant.behaviordemo.DisInterceptNestedScrollView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:layout_collapseMode="parallax"
                app:layout_collapseParallaxMultiplier="0.8">

                <LinearLayout
                    android:id="@+id/user_head_container"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical">


                    <ImageView
                        android:layout_width="match_parent"
                        android:layout_height="200dp"
                        android:src="@mipmap/test"
                        android:scaleType="centerCrop"
                        android:tag="overScroll" />

                </LinearLayout>

            </com.itant.behaviordemo.DisInterceptNestedScrollView>


            <!--<android.support.v7.widget.Toolbar
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:gravity="center"
                app:layout_collapseMode="pin">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="我是Toolbar" />
            </android.support.v7.widget.Toolbar>-->

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


        <com.itant.behaviordemo.DisInterceptNestedScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">


                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="48dp"
                    android:text="我是悬浮的控件"
                    android:background="@android:color/holo_blue_light"/>

            </LinearLayout>

        </com.itant.behaviordemo.DisInterceptNestedScrollView>


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


    <android.support.v4.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#0f0"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        android:tag="bottomList">

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/test" />
    </android.support.v4.widget.NestedScrollView>

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

