<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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="wrap_content"
    android:background="#F2F6F7"
    android:orientation="vertical">

    <LinearLayout
        android:id="@+id/statusBar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/shape_health_bg_new"
        android:orientation="horizontal"
        android:visibility="gone" />

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="@dimen/dp_86">

        <ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginStart="@dimen/dp_12"
            android:scaleType="fitXY"
            android:src="@mipmap/ic_head_bg" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <!--   我的家人列表     -->
            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/mRecycle"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/dp_17"
                android:layout_marginBottom="@dimen/dp_3"
                android:layout_weight="1" />

            <RelativeLayout
                android:id="@+id/mMsgLayout"
                android:layout_width="@dimen/dp_32"
                android:layout_height="@dimen/dp_32"
                android:layout_marginRight="@dimen/dp_14"
                android:layout_marginBottom="@dimen/dp_6"
                android:visibility="gone">

                <ImageView
                    android:id="@+id/mMsg"
                    android:layout_width="@dimen/dp_24"
                    android:layout_height="@dimen/dp_24"
                    android:layout_centerHorizontal="true"
                    android:layout_centerVertical="true"
                    android:src="@mipmap/ic_health_msg" />

                <androidx.cardview.widget.CardView
                    android:id="@+id/mBadgeCard"
                    android:layout_width="@dimen/dp_13"
                    android:layout_height="@dimen/dp_13"
                    android:layout_alignParentEnd="true"
                    android:visibility="gone"
                    app:cardBackgroundColor="@color/col_f23"
                    app:cardCornerRadius="@dimen/dp_10"
                    app:cardElevation="0dp">

                    <TextView
                        android:id="@+id/mBadge"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_gravity="center"
                        android:gravity="center"
                        android:textColor="@color/white"
                        android:textSize="@dimen/sp_10"
                        tools:text="12" />

                </androidx.cardview.widget.CardView>

            </RelativeLayout>

        </LinearLayout>

    </FrameLayout>

    <!--  下拉刷新控件  -->
    <com.scwang.smart.refresh.layout.SmartRefreshLayout
        android:id="@+id/mRefresh"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        app:srlAccentColor="@color/white">

        <!--   经典下拉头部     -->
        <com.scwang.smart.refresh.header.ClassicsHeader
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:foregroundTint="@color/black"
            app:srlAccentColor="@color/black"
            app:srlPrimaryColor="@color/white" />

        <androidx.core.widget.NestedScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent">

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

                <FrameLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent">

                    <ImageView
                        android:layout_width="match_parent"
                        android:layout_height="@dimen/dp_72"
                        android:layout_marginStart="@dimen/dp_39"
                        android:scaleType="fitXY"
                        android:src="@mipmap/ic_status_bg" />

                    <include
                        android:id="@+id/mCom"
                        layout="@layout/frag_dynamic_management_header"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        app:layout_constraintLeft_toLeftOf="parent"
                        app:layout_constraintRight_toRightOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                </FrameLayout>

                <LinearLayout
                    android:id="@+id/ll_my_info"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/dp_14"
                    android:layout_marginTop="@dimen/dp_10"
                    android:layout_marginRight="@dimen/dp_14"
                    android:orientation="horizontal"
                    app:layout_constraintLeft_toLeftOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/mCom">

                    <androidx.cardview.widget.CardView
                        android:id="@+id/my_manager"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        app:cardCornerRadius="@dimen/dp_5"
                        app:cardElevation="@dimen/dp_0">

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_margin="@dimen/dp_13"
                            android:drawableStart="@mipmap/ic_my_manager"
                            android:drawablePadding="@dimen/dp_9"
                            android:gravity="center"
                            android:text="我的管家"
                            android:textColor="@color/col_313"
                            android:textSize="@dimen/sp_15" />

                    </androidx.cardview.widget.CardView>

                    <androidx.cardview.widget.CardView
                        android:id="@+id/my_health_da"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="@dimen/dp_14"
                        android:layout_weight="1"
                        app:cardCornerRadius="@dimen/dp_5"
                        app:cardElevation="@dimen/dp_0">

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_margin="@dimen/dp_13"
                            android:drawableStart="@mipmap/ic_my_da"
                            android:drawablePadding="@dimen/dp_9"
                            android:gravity="center"
                            android:text="健康档案"
                            android:textColor="@color/col_313"
                            android:textSize="@dimen/sp_15" />

                    </androidx.cardview.widget.CardView>

                </LinearLayout>

                <androidx.cardview.widget.CardView
                    android:id="@+id/mBannerCard"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/dp_14"
                    android:layout_marginTop="@dimen/dp_10"
                    android:layout_marginRight="@dimen/dp_14"
                    app:cardCornerRadius="@dimen/dp_5"
                    app:cardElevation="@dimen/dp_0"
                    app:layout_constraintLeft_toLeftOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/ll_my_info">

                    <com.youth.banner.Banner
                        android:id="@+id/mBanner"
                        android:layout_width="match_parent"
                        android:layout_height="@dimen/dp_90"
                        android:background="@drawable/shape_banner_bg"
                        app:banner_indicator_normal_color="@color/col_298D0"
                        app:banner_indicator_selected_color="@color/col_8D0"
                        app:banner_infinite_loop="true"
                        app:banner_loop_time="4000" />

                </androidx.cardview.widget.CardView>

                <androidx.cardview.widget.CardView
                    android:id="@+id/cv_tools"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/dp_14"
                    android:layout_marginTop="@dimen/dp_10"
                    android:layout_marginRight="@dimen/dp_14"
                    android:layout_marginBottom="@dimen/dp_12"
                    app:cardCornerRadius="@dimen/dp_5"
                    app:cardElevation="@dimen/dp_0"
                    app:layout_constraintLeft_toLeftOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/mBannerCard">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:paddingTop="@dimen/dp_15"
                        android:paddingBottom="@dimen/dp_15">

                        <TextView
                            android:id="@+id/tv_risk_commit"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:drawablePadding="@dimen/dp_5"
                            android:gravity="center"
                            android:text="@string/early_2"
                            android:textColor="@color/col_313"
                            android:textSize="@dimen/sp_12"
                            app:drawableTopCompat="@mipmap/ic_risk_evaluate" />

                        <TextView
                            android:id="@+id/tv_tongue_diagnosis"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:drawablePadding="@dimen/dp_5"
                            android:gravity="center"
                            android:text="@string/tongue_diagnoise"
                            android:textColor="@color/col_313"
                            android:textSize="@dimen/sp_12"
                            app:drawableTopCompat="@mipmap/ic_tongue_diagnosis" />

                        <TextView
                            android:id="@+id/tv_check_cancer"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:drawableTop="@mipmap/ic_cancer_prevention"
                            android:drawablePadding="@dimen/dp_5"
                            android:gravity="center"
                            android:text="@string/cancer_prevention"
                            android:textColor="@color/col_313"
                            android:textSize="@dimen/sp_12" />

                        <TextView
                            android:id="@+id/tv_health_risk"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:drawableTop="@mipmap/ic_health_risk"
                            android:drawablePadding="@dimen/dp_5"
                            android:gravity="center"
                            android:text="@string/health_risk"
                            android:textColor="@color/col_313"
                            android:textSize="@dimen/sp_12" />

                    </LinearLayout>

                </androidx.cardview.widget.CardView>

                <!--       健康监测         -->
                <include
                    android:id="@+id/mOrgan_view"
                    layout="@layout/child_organ_view"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/dp_10"
                    android:layout_marginTop="@dimen/dp_12"
                    android:layout_marginRight="@dimen/dp_10"
                    android:visibility="gone"
                    app:layout_constraintLeft_toLeftOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/mBannerCard" />

                <include
                    android:id="@+id/mChild_home_view"
                    layout="@layout/child_home_healt"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@+id/cv_tools" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/dp_5"
                    android:gravity="center_horizontal"
                    android:padding="@dimen/dp_15"
                    android:text="-  用科技守护健康  -"
                    android:textColor="@color/col_8D0"
                    android:textSize="@dimen/dp_15"
                    android:textStyle="bold"
                    app:layout_constraintTop_toBottomOf="@+id/mChild_home_view" />


            </LinearLayout>

        </androidx.core.widget.NestedScrollView>

    </com.scwang.smart.refresh.layout.SmartRefreshLayout>

</LinearLayout>
