<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <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:id="@+id/image"
                                android:layout_width="120dp"
                                android:layout_height="match_parent"
                                android:scaleType="fitXY" />
                        </android.support.v7.widget.CardView>

                        <TextView
                            android:id="@+id/name"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="10dp"
                            android:gravity="center"
                            android:textColor="#FFF"
                            android:textSize="14sp"
                            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="#fff"
                                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:textColor="#fff"
                                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:id="@+id/protein_text"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="4.1克"
                                    android:textColor="#fff"
                                    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:id="@+id/fat_text"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:textColor="#fff"
                                    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:id="@+id/suger_text"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="4.1克"
                                    android:textColor="#fff"
                                    android:textSize="10sp" />
                            </LinearLayout>


                        </LinearLayout>
                    </LinearLayout>

                </LinearLayout>

                <ImageView
                    android:id="@+id/back_button"
                    android:layout_width="20dp"
                    android:layout_height="20dp"
                    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:id="@+id/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:background="#ffffff">

                </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:background="#ffffff">

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

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

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

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

    <com.nightonke.boommenu.BoomMenuButton
        android:id="@+id/boom_menu_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        app:bmb_buttonEnum="ham"
        app:bmb_buttonPlaceEnum="buttonPlace_ham_1"
        app:bmb_normalColor="#8cbc79"
        app:bmb_piecePlaceEnum="piecePlace_ham_1" />

</RelativeLayout>







