Files
StallDualScreen/app/src/main/res/layout/item_user_nutrition.xml
T
2025-08-01 15:57:12 +08:00

140 lines
5.0 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="540dp"
android:layout_height="487dp"
android:visibility="visible"
android:padding="28dp">
<TextView
android:id="@+id/tv_user_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="夏*秋"
android:textColor="#ffece7d0"
android:textSize="20sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_recommend_heat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="推荐热量:680kcal"
android:textColor="#ffece7d0"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_user_name" />
<View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_marginTop="40dp"
android:background="#19ECE7D0"
app:layout_constraintTop_toBottomOf="@id/tv_user_name" />
<androidx.constraintlayout.helper.widget.Flow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:paddingBottom="40dp"
app:constraint_referenced_ids="fl_heat, fl_staple_food, fl_fruits_vegetables, fl_meat_eggs"
app:flow_wrapMode="none"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<FrameLayout
android:id="@+id/fl_heat"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<com.sw.dualscreen.view.CustomImageView
android:id="@+id/iv_heat"
android:layout_width="87dp"
android:layout_height="0dp"
android:layout_gravity="bottom|center"
android:layout_marginBottom="33dp"
android:background="#DB0000" />
<ImageView
android:layout_width="87dp"
android:layout_height="wrap_content"
android:src="@drawable/ic_cylinder_red_small" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:layout_marginBottom="33dp"
android:src="@drawable/ic_heat" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:text="热量"
android:textColor="#fff0e6dc"
android:textSize="20sp" />
</FrameLayout>
<FrameLayout
android:id="@+id/fl_staple_food"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<com.sw.dualscreen.view.CustomImageView
android:id="@+id/iv_staple_food"
android:layout_width="87dp"
android:layout_height="100dp"
android:layout_gravity="bottom|center"
android:src="#99CC99" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:src="@drawable/ic_staple_food" />
</FrameLayout>
<FrameLayout
android:id="@+id/fl_fruits_vegetables"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<com.sw.dualscreen.view.CustomImageView
android:id="@+id/iv_fruits_vegetables"
android:layout_width="87dp"
android:layout_height="match_parent"
android:layout_gravity="bottom|center" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:src="@drawable/ic_fruits_vegetables" />
</FrameLayout>
<FrameLayout
android:id="@+id/fl_meat_eggs"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<com.sw.dualscreen.view.CustomImageView
android:id="@+id/iv_meat_eggs"
android:layout_width="87dp"
android:layout_height="match_parent"
android:layout_gravity="bottom|center" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:src="@drawable/ic_meat_eggs" />
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>