修改了用户热量信息界面

This commit is contained in:
zxj
2025-08-01 18:14:06 +08:00
parent 16554805ad
commit 5ae72cdf04
16 changed files with 147 additions and 84 deletions
@@ -95,6 +95,11 @@ class SecondaryScreenPresentation(
itemUserNutritionBinding.tvUserName.text = it.userName.maskName()
itemUserNutritionBinding.tvRecommendHeat.text =
"推荐热量:${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
stepChangeCallback(currentStep)
binding.tvFoodInfo.text = "菜品识别中"
binding.ivFaceBg.visibility = View.GONE
binding.flPreview.visibility = View.VISIBLE
// binding.previewView.visibility = View.VISIBLE
binding.ivImg.visibility = View.VISIBLE
binding.flFace.visibility = View.GONE
pauseCamera()
@@ -171,6 +176,7 @@ class SecondaryScreenPresentation(
resumeCamera()
binding.tvFoodInfo.text = foodInfo.foodName
binding.ivFaceBg.visibility = View.VISIBLE
binding.flPreview.visibility = View.GONE
binding.flFace.visibility = View.VISIBLE
@@ -205,9 +211,6 @@ class SecondaryScreenPresentation(
}
binding.tvFoodInfo.text = currentFood!!.foodName
binding.flPreview.visibility = View.VISIBLE
// binding.previewView.visibility = View.GONE
binding.ivImg.visibility = View.VISIBLE
GlideUtils.loadRoundCornerImage(
context,
@@ -215,7 +218,9 @@ class SecondaryScreenPresentation(
imageView = binding.ivImg,
radius = 12
)
binding.flPreview.visibility = View.VISIBLE
// binding.previewView.visibility = View.GONE
binding.ivImg.visibility = View.VISIBLE
binding.flFace.visibility = View.GONE
binding.ivFaceBg.visibility = View.GONE
binding.tvFaceTip.visibility = View.GONE
@@ -317,7 +322,7 @@ class SecondaryScreenPresentation(
recognizeViewModel.recognizeNotice.observe(activity, Observer { notice: String? ->
Timber.i("recognizeNotice observe notice = $notice")
if (currentStep == 3 && notice == "leave") {
step1()
// step1()
}
})