修改了用户热量信息界面
@@ -121,7 +121,11 @@ class MainActivity : AppCompatActivity() {
|
|||||||
)
|
)
|
||||||
binding.recyclerview.adapter = adapter
|
binding.recyclerview.adapter = adapter
|
||||||
binding.tvFoodName.setOnClickListener {
|
binding.tvFoodName.setOnClickListener {
|
||||||
|
if (presentation.currentStep == 2) {
|
||||||
presentation.step3()
|
presentation.step3()
|
||||||
|
} else {
|
||||||
|
presentation.step1()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
registerDataChange()
|
registerDataChange()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,6 +95,11 @@ class SecondaryScreenPresentation(
|
|||||||
itemUserNutritionBinding.tvUserName.text = it.userName.maskName()
|
itemUserNutritionBinding.tvUserName.text = it.userName.maskName()
|
||||||
itemUserNutritionBinding.tvRecommendHeat.text =
|
itemUserNutritionBinding.tvRecommendHeat.text =
|
||||||
"推荐热量:${it.recommendMin}-${it.recommendMax}"
|
"推荐热量:${it.recommendMin}-${it.recommendMax}"
|
||||||
|
|
||||||
|
itemUserNutritionBinding.customKcalColumn.setCustomHeight(280, true)
|
||||||
|
itemUserNutritionBinding.customFoodColumn.setCustomHeightPercent(1f, true)
|
||||||
|
itemUserNutritionBinding.customVegetableColumn.setCustomHeightPercent(0.5f, true)
|
||||||
|
itemUserNutritionBinding.customMeatColumn.setCustomHeightPercent(0f, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -150,8 +155,8 @@ class SecondaryScreenPresentation(
|
|||||||
currentStep = 1
|
currentStep = 1
|
||||||
stepChangeCallback(currentStep)
|
stepChangeCallback(currentStep)
|
||||||
binding.tvFoodInfo.text = "菜品识别中"
|
binding.tvFoodInfo.text = "菜品识别中"
|
||||||
|
binding.ivFaceBg.visibility = View.GONE
|
||||||
binding.flPreview.visibility = View.VISIBLE
|
binding.flPreview.visibility = View.VISIBLE
|
||||||
// binding.previewView.visibility = View.VISIBLE
|
|
||||||
binding.ivImg.visibility = View.VISIBLE
|
binding.ivImg.visibility = View.VISIBLE
|
||||||
binding.flFace.visibility = View.GONE
|
binding.flFace.visibility = View.GONE
|
||||||
pauseCamera()
|
pauseCamera()
|
||||||
@@ -171,6 +176,7 @@ class SecondaryScreenPresentation(
|
|||||||
resumeCamera()
|
resumeCamera()
|
||||||
binding.tvFoodInfo.text = foodInfo.foodName
|
binding.tvFoodInfo.text = foodInfo.foodName
|
||||||
|
|
||||||
|
binding.ivFaceBg.visibility = View.VISIBLE
|
||||||
binding.flPreview.visibility = View.GONE
|
binding.flPreview.visibility = View.GONE
|
||||||
|
|
||||||
binding.flFace.visibility = View.VISIBLE
|
binding.flFace.visibility = View.VISIBLE
|
||||||
@@ -205,9 +211,6 @@ class SecondaryScreenPresentation(
|
|||||||
}
|
}
|
||||||
binding.tvFoodInfo.text = currentFood!!.foodName
|
binding.tvFoodInfo.text = currentFood!!.foodName
|
||||||
|
|
||||||
binding.flPreview.visibility = View.VISIBLE
|
|
||||||
// binding.previewView.visibility = View.GONE
|
|
||||||
binding.ivImg.visibility = View.VISIBLE
|
|
||||||
|
|
||||||
GlideUtils.loadRoundCornerImage(
|
GlideUtils.loadRoundCornerImage(
|
||||||
context,
|
context,
|
||||||
@@ -215,7 +218,9 @@ class SecondaryScreenPresentation(
|
|||||||
imageView = binding.ivImg,
|
imageView = binding.ivImg,
|
||||||
radius = 12
|
radius = 12
|
||||||
)
|
)
|
||||||
|
binding.flPreview.visibility = View.VISIBLE
|
||||||
|
// binding.previewView.visibility = View.GONE
|
||||||
|
binding.ivImg.visibility = View.VISIBLE
|
||||||
binding.flFace.visibility = View.GONE
|
binding.flFace.visibility = View.GONE
|
||||||
binding.ivFaceBg.visibility = View.GONE
|
binding.ivFaceBg.visibility = View.GONE
|
||||||
binding.tvFaceTip.visibility = View.GONE
|
binding.tvFaceTip.visibility = View.GONE
|
||||||
@@ -317,7 +322,7 @@ class SecondaryScreenPresentation(
|
|||||||
recognizeViewModel.recognizeNotice.observe(activity, Observer { notice: String? ->
|
recognizeViewModel.recognizeNotice.observe(activity, Observer { notice: String? ->
|
||||||
Timber.i("recognizeNotice observe notice = $notice")
|
Timber.i("recognizeNotice observe notice = $notice")
|
||||||
if (currentStep == 3 && notice == "leave") {
|
if (currentStep == 3 && notice == "leave") {
|
||||||
step1()
|
// step1()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ public class CustomImageView extends androidx.appcompat.widget.AppCompatImageVie
|
|||||||
private String textToDraw;
|
private String textToDraw;
|
||||||
private Paint mPaint;
|
private Paint mPaint;
|
||||||
private int mTextSize = dpToPixels(26);
|
private int mTextSize = dpToPixels(26);
|
||||||
|
/**
|
||||||
|
* 最大高度
|
||||||
|
*/
|
||||||
|
private static final int MAX_HEIGHT = 280;
|
||||||
|
|
||||||
private boolean isDrawText = false;
|
private boolean isDrawText = false;
|
||||||
|
|
||||||
@@ -65,6 +69,10 @@ public class CustomImageView extends androidx.appcompat.widget.AppCompatImageVie
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setCustomHeightPercent(float percent, boolean isAnimation) {
|
||||||
|
setCustomHeight((int) (percent * MAX_HEIGHT), isAnimation);
|
||||||
|
}
|
||||||
|
|
||||||
// 用于设置自定义高度的方法
|
// 用于设置自定义高度的方法
|
||||||
public void setCustomHeight(int height, boolean isAnimation) {
|
public void setCustomHeight(int height, boolean isAnimation) {
|
||||||
ViewGroup.LayoutParams layoutParams = getLayoutParams();
|
ViewGroup.LayoutParams layoutParams = getLayoutParams();
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 929 B |
|
After Width: | Height: | Size: 815 B |
@@ -32,7 +32,7 @@
|
|||||||
android:id="@+id/divider"
|
android:id="@+id/divider"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="2dp"
|
android:layout_height="2dp"
|
||||||
android:layout_marginTop="40dp"
|
android:layout_marginTop="26dp"
|
||||||
android:background="#19ECE7D0"
|
android:background="#19ECE7D0"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_user_name" />
|
app:layout_constraintTop_toBottomOf="@id/tv_user_name" />
|
||||||
|
|
||||||
@@ -42,13 +42,17 @@
|
|||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<RelativeLayout
|
<!-- 热量 -->
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
style="@style/takeFoodLayout"
|
style="@style/takeFoodLayout"
|
||||||
android:layout_weight="2">
|
android:layout_weight="1.7">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/kcalValueLayout"
|
||||||
style="@style/takeFoodWeightLayout"
|
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
|
<TextView
|
||||||
android:id="@+id/totalKcalTv"
|
android:id="@+id/totalKcalTv"
|
||||||
@@ -58,47 +62,57 @@
|
|||||||
<TextView
|
<TextView
|
||||||
style="@style/takeFoodValueTv"
|
style="@style/takeFoodValueTv"
|
||||||
android:text="千卡"
|
android:text="千卡"
|
||||||
android:textSize="@dimen/sp16" />
|
android:textSize="@dimen/sp11" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/divKcalView"
|
android:id="@+id/divKcalView"
|
||||||
android:layout_width="1dp"
|
android:layout_width="1dp"
|
||||||
android:layout_height="@dimen/dp28"
|
android:layout_height="@dimen/dp16"
|
||||||
android:layout_above="@id/customKcalColumn"
|
app:layout_constraintBottom_toTopOf="@id/customKcalColumn"
|
||||||
android:layout_centerHorizontal="true" />
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent" />
|
||||||
|
|
||||||
<com.sw.dualscreen.view.CustomImageView
|
<com.sw.dualscreen.view.CustomImageView
|
||||||
android:id="@+id/customKcalColumn"
|
android:id="@+id/customKcalColumn"
|
||||||
android:layout_width="@dimen/dp130"
|
android:layout_width="@dimen/dp87"
|
||||||
android:layout_height="100dp"
|
android:layout_height="10dp"
|
||||||
android:layout_above="@id/imgKcal"
|
android:layout_marginBottom="6dp"
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:layout_marginBottom="-36dp"
|
|
||||||
android:scaleType="fitXY"
|
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
|
<ImageView
|
||||||
android:id="@+id/imgKcal"
|
android:id="@+id/imgKcal"
|
||||||
android:layout_width="@dimen/dp160"
|
android:layout_width="@dimen/dp107"
|
||||||
android:layout_height="@dimen/dp66"
|
android:layout_height="@dimen/dp44"
|
||||||
android:layout_above="@id/kcalTv"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:scaleType="fitXY"
|
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
|
<TextView
|
||||||
android:id="@+id/kcalTv"
|
android:id="@+id/kcalTv"
|
||||||
style="@style/takeFoodNameTv"
|
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
|
<LinearLayout
|
||||||
|
android:id="@+id/foodValueLayout"
|
||||||
style="@style/takeFoodWeightLayout"
|
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
|
<TextView
|
||||||
android:id="@+id/totalFoodTv"
|
android:id="@+id/totalFoodTv"
|
||||||
@@ -108,40 +122,50 @@
|
|||||||
<TextView
|
<TextView
|
||||||
style="@style/takeFoodValueTv"
|
style="@style/takeFoodValueTv"
|
||||||
android:text="克"
|
android:text="克"
|
||||||
android:textSize="@dimen/sp16" />
|
android:textSize="@dimen/sp11" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/divTotalFoodView"
|
android:id="@+id/divTotalFoodView"
|
||||||
android:layout_width="1dp"
|
android:layout_width="1dp"
|
||||||
android:layout_height="@dimen/dp28"
|
android:layout_height="@dimen/dp16"
|
||||||
android:layout_above="@id/customFoodColumn"
|
app:layout_constraintBottom_toTopOf="@id/customFoodColumn"
|
||||||
android:layout_centerHorizontal="true" />
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent" />
|
||||||
|
|
||||||
<com.sw.dualscreen.view.CustomImageView
|
<com.sw.dualscreen.view.CustomImageView
|
||||||
android:id="@+id/customFoodColumn"
|
android:id="@+id/customFoodColumn"
|
||||||
style="@style/takeFoodCustomColumn"
|
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
|
<ImageView
|
||||||
android:id="@+id/imgFood"
|
android:id="@+id/imgFood"
|
||||||
android:layout_width="wrap_content"
|
style="@style/takeFoodImg"
|
||||||
android:layout_height="100dp"
|
android:src="@drawable/ic_staple_food"
|
||||||
android:scaleType="fitXY"
|
app:layout_constraintBottom_toTopOf="@id/foodTv"
|
||||||
android:layout_above="@id/foodTv"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
android:src="@drawable/ic_staple_food" />
|
app:layout_constraintRight_toRightOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/foodTv"
|
android:id="@+id/foodTv"
|
||||||
style="@style/takeFoodNameTv"
|
style="@style/takeFoodNameTv"
|
||||||
android:text="主食" />
|
android:text="主食"
|
||||||
</RelativeLayout>
|
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
|
<LinearLayout
|
||||||
|
android:id="@+id/vegetableValueLayout"
|
||||||
style="@style/takeFoodWeightLayout"
|
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
|
<TextView
|
||||||
android:id="@+id/totalVegetableTv"
|
android:id="@+id/totalVegetableTv"
|
||||||
@@ -151,38 +175,50 @@
|
|||||||
<TextView
|
<TextView
|
||||||
style="@style/takeFoodValueTv"
|
style="@style/takeFoodValueTv"
|
||||||
android:text="克"
|
android:text="克"
|
||||||
android:textSize="@dimen/sp16" />
|
android:textSize="@dimen/sp11" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/divVegetableView"
|
android:id="@+id/divVegetableView"
|
||||||
android:layout_width="1dp"
|
android:layout_width="1dp"
|
||||||
android:layout_height="@dimen/dp28"
|
android:layout_height="@dimen/dp16"
|
||||||
android:layout_above="@id/customVegetableColumn"
|
app:layout_constraintBottom_toTopOf="@id/customVegetableColumn"
|
||||||
android:layout_centerHorizontal="true" />
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent" />
|
||||||
|
|
||||||
<com.sw.dualscreen.view.CustomImageView
|
<com.sw.dualscreen.view.CustomImageView
|
||||||
android:id="@+id/customVegetableColumn"
|
android:id="@+id/customVegetableColumn"
|
||||||
style="@style/takeFoodCustomColumn"
|
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
|
<ImageView
|
||||||
android:id="@+id/imgVegetable"
|
android:id="@+id/imgVegetable"
|
||||||
style="@style/takeFoodImg"
|
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
|
<TextView
|
||||||
android:id="@+id/vegetableTv"
|
android:id="@+id/vegetableTv"
|
||||||
style="@style/takeFoodNameTv"
|
style="@style/takeFoodNameTv"
|
||||||
android:text="果蔬" />
|
android:text="果蔬"
|
||||||
</RelativeLayout>
|
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
|
<LinearLayout
|
||||||
|
android:id="@+id/meatValueLayout"
|
||||||
style="@style/takeFoodWeightLayout"
|
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
|
<TextView
|
||||||
android:id="@+id/totalMeatTv"
|
android:id="@+id/totalMeatTv"
|
||||||
@@ -192,33 +228,40 @@
|
|||||||
<TextView
|
<TextView
|
||||||
style="@style/takeFoodValueTv"
|
style="@style/takeFoodValueTv"
|
||||||
android:text="克"
|
android:text="克"
|
||||||
android:textSize="@dimen/sp16" />
|
android:textSize="@dimen/sp11" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/divMeatView"
|
android:id="@+id/divMeatView"
|
||||||
android:layout_width="1dp"
|
android:layout_width="1dp"
|
||||||
android:layout_height="@dimen/dp28"
|
android:layout_height="@dimen/dp16"
|
||||||
android:layout_above="@id/customMeatColumn"
|
app:layout_constraintBottom_toTopOf="@id/customMeatColumn"
|
||||||
android:layout_centerHorizontal="true" />
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent" />
|
||||||
|
|
||||||
<com.sw.dualscreen.view.CustomImageView
|
<com.sw.dualscreen.view.CustomImageView
|
||||||
android:id="@+id/customMeatColumn"
|
android:id="@+id/customMeatColumn"
|
||||||
style="@style/takeFoodCustomColumn"
|
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
|
<ImageView
|
||||||
android:id="@+id/imgMeat"
|
android:id="@+id/imgMeat"
|
||||||
style="@style/takeFoodImg"
|
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
|
<TextView
|
||||||
android:id="@+id/meatTv"
|
android:id="@+id/meatTv"
|
||||||
style="@style/takeFoodNameTv"
|
style="@style/takeFoodNameTv"
|
||||||
android:text="蛋肉" />
|
android:text="蛋肉"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
</RelativeLayout>
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_gravity="top|center_horizontal"
|
android:layout_gravity="top|center_horizontal"
|
||||||
android:background="@drawable/ic_cylinder_red_small" />
|
android:background="@drawable/img_red_column" />
|
||||||
<!-- 底部火焰图片(覆盖圆柱底部) -->
|
<!-- 底部火焰图片(覆盖圆柱底部) -->
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/bottomImage"
|
android:id="@+id/bottomImage"
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="bottom_sheet_height">1000dp</dimen>
|
<dimen name="bottom_sheet_height">1000dp</dimen>
|
||||||
<dimen name="sp16">16sp</dimen>
|
<dimen name="sp11">11sp</dimen>
|
||||||
<dimen name="sp30">30sp</dimen>
|
<dimen name="sp20">20sp</dimen>
|
||||||
<dimen name="dp28">28dp</dimen>
|
<dimen name="dp16">16dp</dimen>
|
||||||
<dimen name="dp120">120dp</dimen>
|
|
||||||
<dimen name="dp130">130dp</dimen>
|
|
||||||
<dimen name="dp160">160dp</dimen>
|
|
||||||
<dimen name="dp66">66dp</dimen>
|
|
||||||
<dimen name="dp80">80dp</dimen>
|
<dimen name="dp80">80dp</dimen>
|
||||||
|
<dimen name="dp87">87dp</dimen>
|
||||||
|
<dimen name="dp107">107dp</dimen>
|
||||||
|
<dimen name="dp44">44dp</dimen>
|
||||||
|
<dimen name="dp53">53dp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -79,40 +79,41 @@
|
|||||||
<item name="android:layout_height">wrap_content</item>
|
<item name="android:layout_height">wrap_content</item>
|
||||||
<item name="android:layout_centerHorizontal">true</item>
|
<item name="android:layout_centerHorizontal">true</item>
|
||||||
<item name="android:gravity">bottom</item>
|
<item name="android:gravity">bottom</item>
|
||||||
<item name="android:layout_marginBottom">20dp</item>
|
<!-- <item name="android:layout_marginBottom">20dp</item>-->
|
||||||
<item name="android:orientation">horizontal</item>
|
<item name="android:orientation">horizontal</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="takeFoodValueTv">
|
<style name="takeFoodValueTv">
|
||||||
<item name="android:layout_width">wrap_content</item>
|
<item name="android:layout_width">wrap_content</item>
|
||||||
<item name="android:layout_height">wrap_content</item>
|
<item name="android:layout_height">wrap_content</item>
|
||||||
<item name="android:textSize">@dimen/sp30</item>
|
<item name="android:textSize">@dimen/sp20</item>
|
||||||
<item name="android:textColor">#F0E6DC</item>
|
<item name="android:textColor">#F0E6DC</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="takeFoodCustomColumn">
|
<style name="takeFoodCustomColumn">
|
||||||
<item name="android:layout_width">@dimen/dp80</item>
|
<item name="android:layout_width">@dimen/dp53</item>
|
||||||
<item name="android:layout_height">100dp</item>
|
<item name="android:layout_height">10dp</item>
|
||||||
<item name="android:layout_centerHorizontal">true</item>
|
<item name="android:layout_centerHorizontal">true</item>
|
||||||
<item name="android:layout_marginBottom">-36dp</item>
|
<!-- <item name="android:layout_marginBottom">-36dp</item>-->
|
||||||
<item name="android:scaleType">fitXY</item>
|
<item name="android:scaleType">fitXY</item>
|
||||||
<item name="android:src">@drawable/ic_cylinder_green_big</item>
|
<item name="android:layout_marginBottom">6dp</item>
|
||||||
|
<item name="android:src">@drawable/img_green_column</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="takeFoodImg">
|
<style name="takeFoodImg">
|
||||||
<item name="android:layout_width">@dimen/dp120</item>
|
<item name="android:layout_width">@dimen/dp80</item>
|
||||||
<item name="android:layout_height">@dimen/dp66</item>
|
<item name="android:layout_height">@dimen/dp44</item>
|
||||||
<item name="android:layout_centerHorizontal">true</item>
|
<item name="android:layout_centerHorizontal">true</item>
|
||||||
<item name="android:scaleType">fitXY</item>
|
<item name="android:scaleType">fitXY</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="takeFoodNameTv">
|
<style name="takeFoodNameTv">
|
||||||
<item name="android:layout_width">wrap_content</item>
|
<item name="android:layout_width">wrap_content</item>
|
||||||
<item name="android:layout_height">wrap_content</item>
|
<item name="android:layout_height">36dp</item>
|
||||||
|
<item name="android:gravity">bottom</item>
|
||||||
<item name="android:textColor">#F0E6DC</item>
|
<item name="android:textColor">#F0E6DC</item>
|
||||||
<item name="android:textSize">@dimen/sp30</item>
|
<item name="android:textSize">@dimen/sp20</item>
|
||||||
<item name="android:textStyle">bold</item>
|
<item name="android:textStyle">bold</item>
|
||||||
<item name="android:layout_marginTop">50dp</item>
|
|
||||||
<item name="android:layout_centerHorizontal">true</item>
|
<item name="android:layout_centerHorizontal">true</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -13,5 +13,7 @@ public class ExampleUnitTest {
|
|||||||
@Test
|
@Test
|
||||||
public void addition_isCorrect() {
|
public void addition_isCorrect() {
|
||||||
assertEquals(4, 2 + 2);
|
assertEquals(4, 2 + 2);
|
||||||
|
int i1 = (int) (0.5f * 280);
|
||||||
|
System.err.println("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||