修改了用户热量信息界面
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginTop="26dp"
|
||||
android:background="#19ECE7D0"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_user_name" />
|
||||
|
||||
@@ -42,13 +42,17 @@
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
<!-- 热量 -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
style="@style/takeFoodLayout"
|
||||
android:layout_weight="2">
|
||||
android:layout_weight="1.7">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/kcalValueLayout"
|
||||
style="@style/takeFoodWeightLayout"
|
||||
android:layout_above="@id/divKcalView">
|
||||
app:layout_constraintBottom_toTopOf="@id/divKcalView"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/totalKcalTv"
|
||||
@@ -58,47 +62,57 @@
|
||||
<TextView
|
||||
style="@style/takeFoodValueTv"
|
||||
android:text="千卡"
|
||||
android:textSize="@dimen/sp16" />
|
||||
android:textSize="@dimen/sp11" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/divKcalView"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="@dimen/dp28"
|
||||
android:layout_above="@id/customKcalColumn"
|
||||
android:layout_centerHorizontal="true" />
|
||||
android:layout_height="@dimen/dp16"
|
||||
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="100dp"
|
||||
android:layout_above="@id/imgKcal"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="-36dp"
|
||||
android:layout_width="@dimen/dp87"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_cylinder_red_big" />
|
||||
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/dp160"
|
||||
android:layout_height="@dimen/dp66"
|
||||
android:layout_above="@id/kcalTv"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="@dimen/dp107"
|
||||
android:layout_height="@dimen/dp44"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_heat" />
|
||||
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:text="热量"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<RelativeLayout style="@style/takeFoodLayout">
|
||||
<!-- 主食 -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout style="@style/takeFoodLayout">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/foodValueLayout"
|
||||
style="@style/takeFoodWeightLayout"
|
||||
android:layout_above="@id/divTotalFoodView">
|
||||
app:layout_constraintBottom_toTopOf="@id/divTotalFoodView"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/totalFoodTv"
|
||||
@@ -108,40 +122,50 @@
|
||||
<TextView
|
||||
style="@style/takeFoodValueTv"
|
||||
android:text="克"
|
||||
android:textSize="@dimen/sp16" />
|
||||
android:textSize="@dimen/sp11" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/divTotalFoodView"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="@dimen/dp28"
|
||||
android:layout_above="@id/customFoodColumn"
|
||||
android:layout_centerHorizontal="true" />
|
||||
android:layout_height="@dimen/dp16"
|
||||
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"
|
||||
android:layout_above="@id/imgFood" />
|
||||
app:layout_constraintBottom_toBottomOf="@id/imgFood"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgFood"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="100dp"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_above="@id/foodTv"
|
||||
android:src="@drawable/ic_staple_food" />
|
||||
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="主食" />
|
||||
</RelativeLayout>
|
||||
android:text="主食"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<RelativeLayout style="@style/takeFoodLayout">
|
||||
<!-- 果蔬 -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout style="@style/takeFoodLayout">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/vegetableValueLayout"
|
||||
style="@style/takeFoodWeightLayout"
|
||||
android:layout_above="@id/divVegetableView">
|
||||
app:layout_constraintBottom_toTopOf="@id/divVegetableView"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/totalVegetableTv"
|
||||
@@ -151,38 +175,50 @@
|
||||
<TextView
|
||||
style="@style/takeFoodValueTv"
|
||||
android:text="克"
|
||||
android:textSize="@dimen/sp16" />
|
||||
android:textSize="@dimen/sp11" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/divVegetableView"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="@dimen/dp28"
|
||||
android:layout_above="@id/customVegetableColumn"
|
||||
android:layout_centerHorizontal="true" />
|
||||
android:layout_height="@dimen/dp16"
|
||||
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"
|
||||
android:layout_above="@id/imgVegetable" />
|
||||
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:layout_above="@id/vegetableTv"
|
||||
android:src="@drawable/ic_fruits_vegetables" />
|
||||
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="果蔬" />
|
||||
</RelativeLayout>
|
||||
android:text="果蔬"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<RelativeLayout style="@style/takeFoodLayout">
|
||||
<!-- 蛋肉 -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout style="@style/takeFoodLayout">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/meatValueLayout"
|
||||
style="@style/takeFoodWeightLayout"
|
||||
android:layout_above="@id/divMeatView">
|
||||
app:layout_constraintBottom_toTopOf="@id/divMeatView"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/totalMeatTv"
|
||||
@@ -192,33 +228,40 @@
|
||||
<TextView
|
||||
style="@style/takeFoodValueTv"
|
||||
android:text="克"
|
||||
android:textSize="@dimen/sp16" />
|
||||
android:textSize="@dimen/sp11" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/divMeatView"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="@dimen/dp28"
|
||||
android:layout_above="@id/customMeatColumn"
|
||||
android:layout_centerHorizontal="true" />
|
||||
android:layout_height="@dimen/dp16"
|
||||
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/takeFoodCustomColumn"
|
||||
android:layout_above="@id/imgMeat" />
|
||||
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:layout_above="@id/meatTv"
|
||||
android:src="@drawable/ic_meat_eggs" />
|
||||
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="蛋肉" />
|
||||
|
||||
</RelativeLayout>
|
||||
android:text="蛋肉"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -49,7 +49,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="top|center_horizontal"
|
||||
android:background="@drawable/ic_cylinder_red_small" />
|
||||
android:background="@drawable/img_red_column" />
|
||||
<!-- 底部火焰图片(覆盖圆柱底部) -->
|
||||
<ImageView
|
||||
android:id="@+id/bottomImage"
|
||||
|
||||
Reference in New Issue
Block a user