<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView 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"
    android:background="@color/col_6f7">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:padding="@dimen/dp_14">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/mConst"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="12dp"
            android:background="@drawable/shape_sleep_bg_8dp">

            <TextView
                android:id="@+id/compare_tv"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/dp_16"
                android:layout_marginTop="@dimen/dp_22"
                android:layout_marginEnd="@dimen/dp_12"
                android:layout_marginBottom="@dimen/dp_27"
                android:drawableEnd="@mipmap/arrow_right"
                android:drawablePadding="@dimen/dp_6"
                android:gravity="center_vertical"
                android:text="查看数据对比"
                android:textColor="@color/col_c7c"
                android:textSize="@dimen/sp_13"
                android:textStyle="bold"
                android:visibility="visible"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:ignore="HardcodedText,UseCompatTextViewDrawableXml" />

            <TextView
                android:id="@+id/tvOpen"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/dp_16"
                android:layout_marginTop="@dimen/dp_22"
                android:layout_marginEnd="@dimen/dp_12"
                android:layout_marginBottom="@dimen/dp_27"
                android:drawableStart="@mipmap/ic_health_fire"
                android:drawableEnd="@mipmap/arrow_right"
                android:drawablePadding="@dimen/dp_4"
                android:gravity="center_vertical"
                android:text="免费体验100天"
                android:textColor="@color/col_02c"
                android:textSize="@dimen/sp_13"
                android:textStyle="bold"
                android:visibility="gone"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:ignore="HardcodedText,UseCompatTextViewDrawableXml" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/dp_16"
                android:layout_marginTop="@dimen/dp_22"
                android:layout_marginBottom="@dimen/dp_27"
                android:drawableStart="@drawable/shape_head_tip_new"
                android:drawablePadding="@dimen/dp_10"
                android:text="当前血糖"
                android:textColor="#313131"
                android:textSize="@dimen/sp_17"
                android:textStyle="bold"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:ignore="UseCompatTextViewDrawableXml" />

            <FrameLayout
                android:id="@+id/mFl"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dp_56"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent">

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:background="@mipmap/ic_bg_oval" />

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

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

                        <TextView
                            android:id="@+id/tvXinLv"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:textColor="@color/col_02c"
                            android:textSize="@dimen/sp_25"
                            android:textStyle="bold"
                            tools:text="85" />

                        <TextView
                            android:id="@+id/tvAfter"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="mmol/L"
                            android:textColor="@color/col_02c"
                            android:textSize="@dimen/sp_13"
                            android:textStyle="bold" />

                    </LinearLayout>

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

                        <TextView
                            android:id="@+id/tvTestTime"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_gravity="center"
                            android:text="次/分"
                            android:textColor="@color/col_6B6"
                            android:textSize="@dimen/sp_12"
                            android:textStyle="bold" />

                    </LinearLayout>

                    <TextView
                        android:id="@+id/tvModelingExplain"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:paddingTop="@dimen/dp_6"
                        android:drawablePadding="@dimen/dp_4"
                        android:drawableStart="@mipmap/ic_info_icon_blue"
                        android:textStyle="bold"
                        android:textColor="@color/col_02c"
                        android:textSize="@dimen/sp_12"
                        android:text="建模说明"
                        tools:ignore="UseCompatTextViewDrawableXml" />

                </LinearLayout>

            </FrameLayout>

            <LinearLayout
                android:id="@+id/llExpireTime"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:orientation="horizontal"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/mFl">

                <TextView
                    android:id="@+id/mTvExpireTime"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:paddingTop="@dimen/dp_20"
                    android:textColor="@color/col_c7c"
                    android:textSize="@dimen/sp_12"
                    tools:text="2023-02-24 15:41:05" />

                <TextView
                    android:id="@+id/tvRenew"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="@dimen/dp_8"
                    android:paddingTop="@dimen/dp_20"
                    android:textColor="@color/col_02c"
                    android:textSize="@dimen/sp_12"
                    android:textStyle="bold"
                    android:visibility="gone"
                    tools:text="立即续费"
                    tools:visibility="visible" />

            </LinearLayout>

            <LinearLayout
                android:id="@+id/llButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginTop="@dimen/dp_20"
                android:orientation="horizontal"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/llExpireTime">

                <!--      动态血糖      -->
                <TextView
                    android:id="@+id/mTvDynamicBloodSugar"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_marginRight="@dimen/dp_10"
                    android:background="@drawable/shape_xy_bg"
                    android:paddingLeft="@dimen/dp_15"
                    android:paddingTop="@dimen/dp_5"
                    android:paddingRight="@dimen/dp_15"
                    android:paddingBottom="@dimen/dp_5"
                    android:text="动态血糖"
                    android:textColor="@color/col_02c"
                    android:textSize="@dimen/sp_13"
                    android:textStyle="bold" />

                <!--    糖化血红蛋白  -->
                <TextView
                    android:id="@+id/mTvGlycosylated"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:background="@drawable/shape_xy_bg"
                    android:paddingLeft="@dimen/dp_15"
                    android:paddingTop="@dimen/dp_5"
                    android:paddingRight="@dimen/dp_15"
                    android:paddingBottom="@dimen/dp_5"
                    android:text="糖化血红蛋白"
                    android:textColor="@color/col_02c"
                    android:textSize="@dimen/sp_13"
                    android:textStyle="bold" />

                <TextView
                    android:id="@+id/mTvOper"
                    android:layout_width="@dimen/dp_85"
                    android:layout_height="match_parent"
                    android:layout_marginLeft="@dimen/dp_8"
                    android:background="@drawable/shape_xy_bg"
                    android:gravity="center"
                    android:padding="@dimen/dp_6"
                    android:text="开通"
                    android:textColor="@color/col_02c"
                    android:textSize="@dimen/sp_13"
                    android:textStyle="bold"
                    android:visibility="gone" />

            </LinearLayout>

            <com.xty.common.weight.FullCircleInfo
                android:id="@+id/mFull"
                android:layout_width="match_parent"
                android:layout_height="200dp"
                android:visibility="gone"
                app:bottom_size="@dimen/dp_15"
                app:bottom_txt="-"
                app:center_txt="-"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:showValue="90"
                app:top_size="@dimen/dp_15"
                app:top_txt="当前心率"
                app:unit="次/分"
                app:value_size="@dimen/dp_30" />

            <include
                android:id="@+id/mOrganView"
                layout="@layout/organ_view_xt"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dp_24"
                android:layout_marginBottom="@dimen/dp_20"
                android:visibility="invisible"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/llButton" />

        </androidx.constraintlayout.widget.ConstraintLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/dp_12"
            android:background="@drawable/shape_sleep_bg_8dp"
            android:orientation="vertical">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dp_22"
                android:gravity="center_vertical"
                android:orientation="horizontal">

                <TextView
                    android:id="@+id/tvProfession"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/dp_16"
                    android:drawableLeft="@drawable/shape_head_tip_new"
                    android:drawablePadding="@dimen/dp_10"
                    android:text="血糖情况"
                    android:textColor="#313131"
                    android:textSize="@dimen/sp_17"
                    android:textStyle="bold" />

                <View
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:layout_weight="1" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="@dimen/dp_16"
                    android:text="单位：mmol/L"
                    tools:ignore="HardcodedText" />

            </LinearLayout>

            <LinearLayout
                android:id="@+id/mConstBottom"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:paddingBottom="@dimen/dp_21">

                <com.xty.common.weight.MyShowValue
                    android:id="@+id/mAvg"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    app:desc="平均血糖"
                    app:desc_color="@color/col_c7c"
                    app:num="--"
                    app:units=""
                    app:unt_color="@color/col_02c"
                    app:values_color="@color/col_02c" />

                <com.xty.common.weight.MyShowValue
                    android:id="@+id/mMax"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    app:desc="最高血糖"
                    app:desc_color="@color/col_c7c"
                    app:num="--"
                    app:units="" />

                <com.xty.common.weight.MyShowValue
                    android:id="@+id/mLow"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    app:desc="最低血糖"
                    app:desc_color="@color/col_c7c"
                    app:num="--"
                    app:units="" />

            </LinearLayout>

        </LinearLayout>

        <!--  头部信息  -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/dp_12"
            android:background="@drawable/shape_sleep_bg_8dp"
            android:orientation="vertical"
            android:paddingLeft="@dimen/dp_11"
            android:paddingTop="@dimen/dp_20"
            android:paddingRight="@dimen/dp_11"
            android:paddingBottom="@dimen/dp_20">

            <RadioGroup
                android:id="@+id/mGroup"
                android:layout_width="match_parent"
                android:layout_height="@dimen/dp_30"
                android:layout_below="@+id/mConstBottom"
                android:layout_gravity="center"
                android:layout_marginLeft="@dimen/dp_60"
                android:layout_marginTop="@dimen/dp_10"
                android:layout_marginRight="@dimen/dp_60"
                android:background="@drawable/shape_radio_group_bg"
                android:orientation="horizontal"
                android:visibility="gone">

                <RadioButton
                    android:id="@+id/mDay"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:background="@drawable/sel_radio"
                    android:button="@null"
                    android:checked="true"
                    android:color="@android:color/transparent"
                    android:gravity="center"
                    android:text="日" />

                <RadioButton
                    android:id="@+id/mWeek"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:background="@drawable/sel_radio"
                    android:button="@null"
                    android:color="@android:color/transparent"
                    android:gravity="center"
                    android:text="周" />

                <RadioButton
                    android:id="@+id/mMonth"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:background="@drawable/sel_radio"
                    android:button="@null"
                    android:color="@android:color/transparent"
                    android:gravity="center"
                    android:text="月" />

                <RadioButton
                    android:id="@+id/mYear"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:background="@drawable/sel_radio"
                    android:button="@null"
                    android:gravity="center"
                    android:text="年" />

            </RadioGroup>

            <TextView
                android:id="@+id/mTvTime"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:drawableRight="@mipmap/ic_down_show"
                android:drawablePadding="@dimen/dp_10"
                android:gravity="center"
                android:paddingTop="@dimen/dp_10"
                android:textColor="@color/col_455"
                android:textSize="@dimen/sp_16"
                android:visibility="gone" />

            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="@dimen/dp_40"
                android:orientation="horizontal">

                <com.xty.common.weight.tablayout.CommonTabLayout
                    android:id="@+id/commonTabLayout"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_marginEnd="@dimen/dp_12"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toStartOf="@+id/tvHideDate"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    app:tl_iconVisible="false"
                    app:tl_indicator_color="@color/col_02c"
                    app:tl_indicator_corner_radius="@dimen/dp_2"
                    app:tl_indicator_height="@dimen/dp_3"
                    app:tl_indicator_width="@dimen/dp_16"
                    app:tl_textSelectColor="@color/col_02c"
                    app:tl_textUnselectColor="#7C7C7C"
                    app:tl_textsize="@dimen/sp_15"
                    app:tl_textsizeSelected="@dimen/sp_15" />

                <ImageView
                    android:id="@+id/ivPosition"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="9dp"
                    android:padding="5dp"
                    android:src="@mipmap/ic_arrow_down"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <TextView
                    android:id="@+id/tvHideDate"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="2023-02-24 至 2023-02-24"
                    android:textColor="#313131"
                    android:textSize="@dimen/sp_12"
                    android:visibility="invisible"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toStartOf="@+id/ivPosition"
                    app:layout_constraintTop_toTopOf="parent" />

                <TextView
                    android:id="@+id/tvShowDate"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="2023-02-24"
                    android:textColor="#313131"
                    android:textSize="@dimen/sp_12"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toStartOf="@+id/ivPosition"
                    app:layout_constraintTop_toTopOf="parent" />

            </androidx.constraintlayout.widget.ConstraintLayout>

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dp_20"
                android:gravity="center_vertical"
                android:visibility="visible">

                <TextView
                    android:id="@+id/mTip"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerVertical="true"
                    android:layout_marginLeft="@dimen/dp_11"
                    android:layout_marginRight="@dimen/dp_20"
                    android:drawableStart="@mipmap/ic_info_icon"
                    android:drawablePadding="@dimen/dp_5"
                    android:text="@string/tip_head"
                    android:textSize="@dimen/sp_12"
                    android:textColor="@color/col_919"
                    tools:ignore="UseCompatTextViewDrawableXml" />

                <ImageView
                    android:id="@+id/zhexian_tv"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentBottom="true"
                    android:layout_toStartOf="@+id/zhuzhuan_tv"
                    android:paddingLeft="@dimen/dp_10"
                    android:paddingTop="@dimen/dp_8"
                    android:paddingRight="@dimen/dp_10"
                    android:paddingBottom="@dimen/dp_8"
                    android:src="@mipmap/ic_zhexiant" />

                <ImageView
                    android:id="@+id/zhuzhuan_tv"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentEnd="true"
                    android:layout_alignParentBottom="true"
                    android:layout_marginEnd="@dimen/dp_8"
                    android:paddingLeft="@dimen/dp_10"
                    android:paddingTop="@dimen/dp_8"
                    android:paddingRight="@dimen/dp_10"
                    android:paddingBottom="@dimen/dp_8"
                    android:src="@mipmap/ic_shuzhuangtu_yixuan" />

                <TextView
                    android:id="@+id/mDescMax"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/dp_20"
                    android:layout_marginRight="@dimen/dp_20"
                    android:layout_toLeftOf="@+id/mDescMin"
                    android:drawablePadding="@dimen/dp_5"
                    android:gravity="center"
                    android:text="高压"
                    android:textColor="@color/col_919"
                    android:visibility="gone" />

                <TextView
                    android:id="@+id/mDescMin"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentRight="true"
                    android:layout_marginLeft="@dimen/dp_20"
                    android:layout_marginRight="@dimen/dp_20"
                    android:drawablePadding="@dimen/dp_5"
                    android:gravity="center"
                    android:text="低压"
                    android:textColor="@color/col_919"
                    android:visibility="gone" />

            </RelativeLayout>

            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="2">

                <com.github.mikephil.charting.charts.LineChart
                    android:id="@+id/mLineChart"
                    android:layout_width="match_parent"
                    android:layout_height="200dp"
                    android:visibility="gone" />

                <com.github.mikephil.charting.charts.BarChart
                    android:id="@+id/mBarChart"
                    android:layout_width="match_parent"
                    android:layout_height="200dp" />

            </FrameLayout>

            <ImageView
                android:id="@+id/iv_xtang_intro"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="@dimen/dp_12"
                android:layout_marginTop="@dimen/dp_25"
                android:layout_marginRight="@dimen/dp_12" />

        </LinearLayout>

        <TextView
            android:id="@+id/tv_tips"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dp_17"
            android:text="温馨提示：手表数据仅作为参考，不作为诊断、治疗依据。"
            android:textColor="@color/col_313"
            android:textSize="@dimen/sp_15" />

    </LinearLayout>

</androidx.core.widget.NestedScrollView>