Android 使用CoordinatorLayout+AppBarLayout+CollapsingToolbarLayout实现伸缩头部和菜单悬停效果

Android 原生控件实现伸缩头部和菜单悬停效果

        <android.support.design.widget.CoordinatorLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <android.support.design.widget.AppBarLayout
                android:id="@+id/app_bar_layout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

				
                <android.support.design.widget.CollapsingToolbarLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">

                    
                    
                    
                    
                    
                    

                    
                    
					
                    <include layout="@layout/book_title_view" />

                android.support.design.widget.CollapsingToolbarLayout>

				
                <com.lanren.common.widget.statusbar.StatusBar
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content" />
            android.support.design.widget.AppBarLayout>

			
            <com.lanren.hovertitlerecylerview.HoverTitleRecyclerView
                android:id="@+id/book_recycler_view"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:layout_behavior="@string/appbar_scrolling_view_behavior" />

        android.support.design.widget.CoordinatorLayout>

你可能感兴趣的:(android)