300 lines
12 KiB
XML
300 lines
12 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.constraintlayout.widget.ConstraintLayout 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:id="@+id/cl_nutritionData"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:visibility="visible">
|
|
|
|
<TextView
|
|
android:id="@+id/tv_user_name"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textColor="#FF5E7585"
|
|
android:textSize="24sp"
|
|
android:textStyle="bold"
|
|
android:layout_marginTop="28dp"
|
|
android:layout_marginStart="41dp"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
tools:text="夏*秋" />
|
|
|
|
<TextView
|
|
android:id="@+id/tv_recommend_heat"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textColor="#FF5E7585"
|
|
android:textSize="24sp"
|
|
android:textStyle="bold"
|
|
android:layout_marginEnd="41dp"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toTopOf="@id/tv_user_name"
|
|
app:layout_constraintBottom_toBottomOf="@id/tv_user_name"
|
|
tools:text="推荐热量:680kcal" />
|
|
|
|
<View
|
|
android:id="@+id/divider"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:layout_marginTop="28dp"
|
|
android:layout_marginHorizontal="28dp"
|
|
android:background="#FF5E7585"
|
|
app:layout_constraintTop_toBottomOf="@id/tv_user_name" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="465dp"
|
|
app:layout_constraintTop_toBottomOf="@id/divider"
|
|
android:paddingBottom="60dp"
|
|
android:orientation="horizontal">
|
|
|
|
<Space
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1.1"/>
|
|
|
|
<!-- 热量 -->
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
style="@style/takeFoodLayoutNew">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/kcalValueLayout"
|
|
style="@style/takeFoodWeightLayout"
|
|
app:layout_constraintBottom_toTopOf="@id/divKcalView"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent">
|
|
|
|
<TextView
|
|
android:id="@+id/totalKcalTv"
|
|
style="@style/takeFoodValueTv"
|
|
android:textSize="24sp"
|
|
android:text="0" />
|
|
|
|
<TextView
|
|
style="@style/takeFoodValueTv"
|
|
android:text="千卡"
|
|
android:textSize="12sp" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
android:id="@+id/divKcalView"
|
|
android:layout_width="1dp"
|
|
android:layout_height="@dimen/dp30"
|
|
app:layout_constraintBottom_toTopOf="@id/customKcalColumn"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent" />
|
|
|
|
<com.sw.dualscreen.view.CustomImageView
|
|
android:id="@+id/customKcalColumn"
|
|
android:layout_width="@dimen/dp130"
|
|
android:layout_height="0dp"
|
|
android:layout_marginBottom="6dp"
|
|
android:scaleType="fitXY"
|
|
android:src="@drawable/img_big_red_column"
|
|
app:layout_constraintBottom_toBottomOf="@id/imgKcal"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent" />
|
|
|
|
<ImageView
|
|
android:id="@+id/imgKcal"
|
|
android:layout_width="@dimen/dp107"
|
|
android:layout_height="@dimen/dp44"
|
|
android:scaleType="fitXY"
|
|
android:src="@drawable/ic_heat"
|
|
app:layout_constraintBottom_toTopOf="@id/kcalTv"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent" />
|
|
|
|
<TextView
|
|
android:id="@+id/kcalTv"
|
|
style="@style/takeFoodNameTv"
|
|
android:text="热量"
|
|
android:textSize="20sp"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
<Space
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1.0"/>
|
|
<!-- 主食 -->
|
|
<androidx.constraintlayout.widget.ConstraintLayout style="@style/takeFoodLayoutNew">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/foodValueLayout"
|
|
style="@style/takeFoodWeightLayout"
|
|
app:layout_constraintBottom_toTopOf="@id/divTotalFoodView"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent">
|
|
|
|
<TextView
|
|
android:id="@+id/totalFoodTv"
|
|
style="@style/takeFoodValueTv"
|
|
android:text="0"
|
|
android:textSize="24sp"/>
|
|
|
|
<TextView
|
|
style="@style/takeFoodValueTv"
|
|
android:text="克"
|
|
android:textSize="12sp" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
android:id="@+id/divTotalFoodView"
|
|
android:layout_width="1dp"
|
|
android:layout_height="@dimen/dp30"
|
|
app:layout_constraintBottom_toTopOf="@id/customFoodColumn"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent" />
|
|
|
|
<com.sw.dualscreen.view.CustomImageView
|
|
android:id="@+id/customFoodColumn"
|
|
style="@style/takeFoodCustomColumn"
|
|
app:layout_constraintBottom_toBottomOf="@id/imgFood"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent" />
|
|
|
|
<ImageView
|
|
android:id="@+id/imgFood"
|
|
style="@style/takeFoodImg"
|
|
android:src="@drawable/ic_staple_food"
|
|
app:layout_constraintBottom_toTopOf="@id/foodTv"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent" />
|
|
|
|
<TextView
|
|
android:id="@+id/foodTv"
|
|
style="@style/takeFoodNameTv"
|
|
android:text="主食"
|
|
android:textSize="20sp"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent" />
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
<Space
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1.0"/>
|
|
<!-- 果蔬 -->
|
|
<androidx.constraintlayout.widget.ConstraintLayout style="@style/takeFoodLayoutNew">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/vegetableValueLayout"
|
|
style="@style/takeFoodWeightLayout"
|
|
app:layout_constraintBottom_toTopOf="@id/divVegetableView"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent">
|
|
|
|
<TextView
|
|
android:id="@+id/totalVegetableTv"
|
|
style="@style/takeFoodValueTv"
|
|
android:text="0"
|
|
android:textSize="24sp" />
|
|
|
|
<TextView
|
|
style="@style/takeFoodValueTv"
|
|
android:text="克"
|
|
android:textSize="12sp" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
android:id="@+id/divVegetableView"
|
|
android:layout_width="1dp"
|
|
android:layout_height="@dimen/dp30"
|
|
app:layout_constraintBottom_toTopOf="@id/customVegetableColumn"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent" />
|
|
|
|
<com.sw.dualscreen.view.CustomImageView
|
|
android:id="@+id/customVegetableColumn"
|
|
style="@style/takeFoodCustomColumn"
|
|
app:layout_constraintBottom_toBottomOf="@id/imgVegetable"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent" />
|
|
|
|
<ImageView
|
|
android:id="@+id/imgVegetable"
|
|
style="@style/takeFoodImg"
|
|
android:src="@drawable/ic_fruits_vegetables"
|
|
app:layout_constraintBottom_toTopOf="@id/vegetableTv"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent" />
|
|
|
|
<TextView
|
|
android:id="@+id/vegetableTv"
|
|
style="@style/takeFoodNameTv"
|
|
android:text="果蔬"
|
|
android:textSize="20sp"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent" />
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
<Space
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1.0"/>
|
|
<!-- 蛋肉 -->
|
|
<androidx.constraintlayout.widget.ConstraintLayout style="@style/takeFoodLayoutNew">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/meatValueLayout"
|
|
style="@style/takeFoodWeightLayout"
|
|
app:layout_constraintBottom_toTopOf="@id/divMeatView"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent">
|
|
|
|
<TextView
|
|
android:id="@+id/totalMeatTv"
|
|
style="@style/takeFoodValueTv"
|
|
android:text="0"
|
|
android:textSize="24sp" />
|
|
|
|
<TextView
|
|
style="@style/takeFoodValueTv"
|
|
android:text="克"
|
|
android:textSize="12sp" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
android:id="@+id/divMeatView"
|
|
android:layout_width="1dp"
|
|
android:layout_height="@dimen/dp30"
|
|
app:layout_constraintBottom_toTopOf="@id/customMeatColumn"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent" />
|
|
|
|
<com.sw.dualscreen.view.CustomImageView
|
|
android:id="@+id/customMeatColumn"
|
|
style="@style/takeFoodCustomColumn2"
|
|
app:layout_constraintBottom_toBottomOf="@id/imgMeat"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent" />
|
|
|
|
<ImageView
|
|
android:id="@+id/imgMeat"
|
|
style="@style/takeFoodImg"
|
|
android:src="@drawable/ic_meat_eggs"
|
|
app:layout_constraintBottom_toTopOf="@id/meatTv"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent" />
|
|
|
|
<TextView
|
|
android:id="@+id/meatTv"
|
|
style="@style/takeFoodNameTv"
|
|
android:text="肉蛋豆"
|
|
android:textSize="20sp"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent" />
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
<Space
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1.1"/>
|
|
</LinearLayout>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout> |