<?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"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <!--clipToPadding = false-->
    <!--令布局可以延伸到状态栏-->

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="250dp">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="200dp"
            app:layout_collapseMode="parallax"
            app:layout_scrollFlags="scroll|enterAlways">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="horizontal">

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1.5"
                    android:gravity="center_horizontal"
                    android:orientation="vertical">

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="50dp" />

                    <android.support.v7.widget.CardView
                        android:layout_width="120dp"
                        android:layout_height="90dp"
                        app:cardCornerRadius="10dp">

                        <ImageView
                            android:layout_width="120dp"
                            android:layout_height="match_parent"
                            android:scaleType="fitXY"
                            android:src="@drawable/food_test" />
                    </android.support.v7.widget.CardView>

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="10dp"
                        android:gravity="center"
                        android:text="红烧肉"
                        android:textColor="#FFF"
                        android:textSize="20sp"
                        android:textStyle="bold" />
                </LinearLayout>

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="2"
                    android:orientation="vertical">

                    <RelativeLayout
                        android:layout_width="match_parent"
                        android:layout_height="50dp">

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_alignParentBottom="true"
                            android:layout_marginLeft="15dp"
                            android:text="营养成分"
                            android:textColor="#000000"
                            android:textSize="15sp"
                            android:textStyle="bold" />

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_alignParentBottom="true"
                            android:layout_alignParentRight="true"
                            android:layout_marginRight="10dp"
                            android:text="单位：每100克"
                            android:textSize="10sp" />

                    </RelativeLayout>

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_marginTop="5dp"
                        android:gravity="center_horizontal"
                        android:orientation="horizontal"
                        android:paddingTop="10dp">

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

                            <com.github.lzyzsd.circleprogress.ArcProgress
                                android:id="@+id/protein_circle"
                                android:layout_width="60dp"
                                android:layout_height="60dp"
                                android:layout_margin="5dp"
                                app:arc_bottom_text="测试"
                                app:arc_progress="50"
                                app:arc_suffix_text_size="12sp"
                                app:arc_text_size="12sp" />

                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="4.1克"
                                android:textSize="10sp" />
                        </LinearLayout>

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

                            <com.github.lzyzsd.circleprogress.ArcProgress
                                android:id="@+id/fat_circle"
                                android:layout_width="60dp"
                                android:layout_height="60dp"
                                android:layout_margin="5dp"
                                app:arc_bottom_text="测试"
                                app:arc_progress="50"
                                app:arc_suffix_text_size="12sp"
                                app:arc_text_size="12sp" />


                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="4.1克"
                                android:textSize="10sp" />
                        </LinearLayout>

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

                            <com.github.lzyzsd.circleprogress.ArcProgress
                                android:id="@+id/carbohydrate_circle"
                                android:layout_width="60dp"
                                android:layout_height="60dp"
                                android:layout_margin="5dp"
                                app:arc_bottom_text="测试"
                                app:arc_progress="50"
                                app:arc_suffix_text_size="12sp"
                                app:arc_text_size="12sp" />

                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="4.1克"
                                android:textSize="10sp" />
                        </LinearLayout>


                    </LinearLayout>
                </LinearLayout>

            </LinearLayout>

            <ImageView
                android:layout_width="25dp"
                android:layout_height="25dp"
                android:layout_marginLeft="15dp"
                android:layout_marginTop="10dp"
                android:src="@drawable/ic_back_button_white" />
        </RelativeLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#FFF"
            android:gravity="center"
            android:orientation="horizontal">

            <ImageView
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:src="@drawable/ic_fortune_cookie" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="10dp"
                android:text="原料与做法"
                android:textColor="#131313"
                android:textSize="13sp" />
        </LinearLayout>

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

    <android.support.v4.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

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

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="40dp"
                android:background="#FFF"
                android:gravity="center_vertical">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="10dp"
                    android:text="主要材料"
                    android:textColor="#000000"
                    android:textSize="15sp"
                    android:textStyle="bold" />
            </RelativeLayout>

            <android.support.v7.widget.RecyclerView
                android:id="@+id/material_recycler_view"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

            </android.support.v7.widget.RecyclerView>

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="40dp"
                android:background="#FFF"
                android:gravity="center_vertical">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="10dp"
                    android:text="详细步骤"
                    android:textColor="#000000"
                    android:textSize="15sp"
                    android:textStyle="bold" />
            </RelativeLayout>

            <android.support.v7.widget.RecyclerView
                android:id="@+id/detail_way_recycler_view"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

            </android.support.v7.widget.RecyclerView>
        </LinearLayout>

    </android.support.v4.widget.NestedScrollView>

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







