diff --git a/app/src/main/java/com/placeholder/ringhealth/feature/home/HomeScreen.kt b/app/src/main/java/com/placeholder/ringhealth/feature/home/HomeScreen.kt
index 41a6f23..4694152 100644
--- a/app/src/main/java/com/placeholder/ringhealth/feature/home/HomeScreen.kt
+++ b/app/src/main/java/com/placeholder/ringhealth/feature/home/HomeScreen.kt
@@ -232,8 +232,10 @@ private fun DeviceStrip(device: RingDeviceState?, modifier: Modifier = Modifier)
* - 步数下挂目标("目标 10,000"),目标本身仍是用户对照自己的尺子
* - 步数一格整格可点进详情;卡路里/活动时长一格整格也点了能进(暂未挂路由,行为同环外区域)
*
- * 数值字号比详情页的 `MetricValueStyle`(44sp)小一档 —— 三件套横向排成一行,
- * 同样的 44sp 会让六位步数("100,000")撑爆格子;30sp 仍属「一眼能读」但不至于抢走下方指标卡的视觉重量。
+ * **第一版的「value + 单位同行」写法装不下**:30sp 字号下「8,426 步」「327 千卡」「47 分钟」
+ * 三件套单元格里都会换行 —— 视觉上「8,426」「步」分两行变成「数值」「单位」两截,反而像丢了内容。
+ * 改为「label 表达单位 + value 纯数字」:label 写成「步数 / 卡路里(千卡)/ 活动(分钟)」,
+ * 把单位塞进 label,value 行只摆数字。
*/
@Composable
private fun TodaySummaryCard(summary: HealthSummary, onOpenSteps: () -> Unit, modifier: Modifier = Modifier) {
@@ -242,7 +244,7 @@ private fun TodaySummaryCard(summary: HealthSummary, onOpenSteps: () -> Unit, mo
SummaryCell(
modifier = Modifier.weight(1f),
label = stringResource(R.string.home_summary_steps_label),
- value = stringResource(R.string.home_summary_steps_value, formatSteps(summary.steps)),
+ value = formatSteps(summary.steps),
subline = stringResource(R.string.home_summary_steps_goal, formatSteps(summary.stepGoal)),
onClick = onOpenSteps,
)
@@ -250,7 +252,7 @@ private fun TodaySummaryCard(summary: HealthSummary, onOpenSteps: () -> Unit, mo
SummaryCell(
modifier = Modifier.weight(1f),
label = stringResource(R.string.home_summary_calories_label),
- value = stringResource(R.string.home_summary_calories_value, formatCalories(summary.calories)),
+ value = formatCalories(summary.calories),
subline = null,
onClick = null,
)
@@ -258,7 +260,7 @@ private fun TodaySummaryCard(summary: HealthSummary, onOpenSteps: () -> Unit, mo
SummaryCell(
modifier = Modifier.weight(1f),
label = stringResource(R.string.home_summary_active_label),
- value = stringResource(R.string.home_summary_active_value, summary.activeMinutes),
+ value = formatActiveMinutes(summary.activeMinutes),
subline = null,
onClick = null,
)
@@ -287,7 +289,7 @@ private fun RowScope.SummaryDivider() {
private val HomeSummaryDivider = androidx.compose.ui.graphics.Color(0xFFE2E5EB)
/**
- * 三件套的单格:上标签、下大数字 + 单位、再下一行小字(步数那一格用,挂目标)。
+ * 三件套的单格:上标签(含单位)、下大数字、再下一行小字(步数那一格用,挂目标)。
*
* `onClick` 为 null 时整格不响应点击(卡路里/活动时长暂未挂详情路由);
* 不为 null 时整格可点(步数一格进步数详情)。
@@ -315,9 +317,9 @@ private fun SummaryCell(
}
}
-/** 三件套单格内的数值字号:30sp + tnum,宽字符数字不会跳。 */
+/** 三件套单格内的数值字号:26sp + tnum;30sp 在三等分格里换行(首版踩过这个坑)。 */
private val TodaySummaryValueStyle = TextStyle(
- fontSize = 30.sp,
+ fontSize = 26.sp,
fontWeight = FontWeight.Bold,
letterSpacing = (-1).sp,
color = TextPrimary,
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 34477e3..b278667 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -165,12 +165,9 @@
今日数据
步数
- %1$s 步
目标 %1$s
- 卡路里
- %1$s 千卡
- 活动时长
- %1$d 分钟
+ 卡路里(千卡)
+ 活动(分钟)
户外跑步