fix: 任务页全面放大字体+显示截止时间

字体放大:任务名34sp, 地点24sp, 时间22sp, 积分26sp, 备注20sp
指引块标题24sp, 说明20sp, 打卡确认44sp
新增截止时间和要求完成时间显示(待抢单状态)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
dongliang
2026-04-28 13:22:41 +09:30
parent 2f0fc675d2
commit d7b61bf0fa
2 changed files with 42 additions and 46 deletions

View File

@@ -238,9 +238,13 @@ class TaskListFragment : BaseFragment<FragmentTaskListBinding>() {
binding.tvPosition.text = "📍 ${detail.positionText}"
binding.tvPosition.visibility = View.VISIBLE
}
// 时间
if (detail.sendTime.isNotEmpty()) {
binding.tvTimeInfo.text = "🕐 ${detail.sendTime}"
// 时间(派单时间 + 截止时间)
val timeLines = mutableListOf<String>()
if (detail.sendTime.isNotEmpty()) timeLines.add("🕐 ${detail.sendTime} 派单")
if (!detail.expireTime.isNullOrEmpty()) timeLines.add("⏰ 截止 ${detail.expireTime}")
if (!detail.preFinishTime.isNullOrEmpty()) timeLines.add("📋 要求 ${detail.preFinishTime} 完成")
if (timeLines.isNotEmpty()) {
binding.tvTimeInfo.text = timeLines.joinToString("\n")
binding.tvTimeInfo.visibility = View.VISIBLE
}
// 积分

View File

@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 任务页面(单任务展示,按原型图V3适老化设计
按状态显示不同内容布局:
- 待抢单:任务名+地点+时间+积分+备注 → 抢单
- 待打卡:任务名+指引块(去哪+怎么做) → 开始打卡
- 无场景:任务名+引导块(无需前往) → 确认打卡
- 待完成:任务名+打卡确认+备注 → 完成任务 -->
<!-- 任务页面按原型图V3适老化设计
120dpi屏幕老年人用户所有字体放大 -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -33,7 +29,6 @@
android:gravity="center_vertical"
android:layout_marginBottom="13dp">
<!-- 返回按钮 -->
<TextView
android:id="@+id/btnBack"
android:layout_width="32dp"
@@ -43,7 +38,6 @@
android:textColor="@color/primary"
android:textSize="27sp" />
<!-- 状态名(接单池/待打卡/待完成) -->
<TextView
android:id="@+id/tvTitle"
android:layout_width="0dp"
@@ -51,15 +45,14 @@
android:layout_weight="1"
android:gravity="center"
android:textColor="@color/text_secondary"
android:textSize="16sp" />
android:textSize="20sp" />
<!-- 页码 1/3 -->
<TextView
android:id="@+id/tvPageNum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text_primary"
android:textSize="17sp"
android:textSize="20sp"
android:textStyle="bold"
android:minWidth="37dp"
android:gravity="end" />
@@ -74,65 +67,63 @@
android:orientation="vertical"
android:visibility="gone">
<!-- 任务名称(最大最突出) -->
<!-- 任务名称(最大最突出34sp -->
<TextView
android:id="@+id/tvTaskName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/text_primary"
android:textSize="28sp"
android:textSize="34sp"
android:textStyle="bold"
android:lineSpacingMultiplier="1.2"
android:layout_marginBottom="13dp" />
<!-- 地点信息项(图标+文字,蓝色 -->
<!-- 地点蓝色24sp -->
<TextView
android:id="@+id/tvPosition"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/primary"
android:textSize="20sp"
android:drawablePadding="8dp"
android:textSize="24sp"
android:layout_marginBottom="8dp"
android:visibility="gone" />
<!-- 时间信息项(图标+文字 -->
<!-- 时间信息22sp -->
<TextView
android:id="@+id/tvTimeInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/text_secondary"
android:textSize="18sp"
android:drawablePadding="8dp"
android:textSize="22sp"
android:lineSpacingMultiplier="1.5"
android:layout_marginBottom="8dp"
android:visibility="gone" />
<!-- 积分(大字橙色) -->
<!-- 积分(橙色大字26sp -->
<TextView
android:id="@+id/tvPoints"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/warning"
android:textSize="22sp"
android:textSize="26sp"
android:textStyle="bold"
android:drawablePadding="8dp"
android:layout_marginBottom="8dp"
android:visibility="gone" />
<!-- 备注块(绿色淡背景) -->
<!-- 备注块(绿色淡背景20sp -->
<TextView
android:id="@+id/tvNote"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_note_green"
android:textColor="@color/text_secondary"
android:textSize="16sp"
android:textSize="20sp"
android:lineSpacingMultiplier="1.5"
android:padding="13dp"
android:padding="16dp"
android:layout_marginBottom="11dp"
android:visibility="gone" />
<!-- ===== 待打卡状态:操作指引块 ===== -->
<!-- ===== 指引块标题24sp说明20sp ===== -->
<!-- 指引块1去哪里橙色 -->
<LinearLayout
@@ -150,7 +141,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/warning"
android:textSize="20sp"
android:textSize="24sp"
android:textStyle="bold" />
<TextView
@@ -158,7 +149,7 @@
android:layout_height="wrap_content"
android:text="找到打卡点后再点下方按钮"
android:textColor="@color/text_secondary"
android:textSize="16sp"
android:textSize="20sp"
android:layout_marginTop="5dp" />
</LinearLayout>
@@ -178,7 +169,7 @@
android:layout_height="wrap_content"
android:text="将手表贴近信标"
android:textColor="@color/primary"
android:textSize="20sp"
android:textSize="24sp"
android:textStyle="bold" />
<TextView
@@ -186,7 +177,7 @@
android:layout_height="wrap_content"
android:text="听到提示音即打卡成功"
android:textColor="@color/text_secondary"
android:textSize="16sp"
android:textSize="20sp"
android:layout_marginTop="5dp" />
</LinearLayout>
@@ -206,7 +197,7 @@
android:layout_height="wrap_content"
android:text="无需前往指定地点"
android:textColor="@color/success"
android:textSize="20sp"
android:textSize="24sp"
android:textStyle="bold" />
<TextView
@@ -214,37 +205,38 @@
android:layout_height="wrap_content"
android:text="确认已就位后,直接点击下方按钮"
android:textColor="@color/text_secondary"
android:textSize="16sp"
android:textSize="20sp"
android:layout_marginTop="5dp" />
</LinearLayout>
<!-- ===== 待完成状态:打卡确认 ===== -->
<!-- ===== 待完成:打卡确认 ===== -->
<LinearLayout
android:id="@+id/blockCheckedIn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:paddingTop="13dp"
android:paddingBottom="13dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:visibility="gone">
<!-- 打卡时间大字 -->
<TextView
android:id="@+id/tvCheckinTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/success"
android:textSize="36sp"
android:textSize="44sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="打卡成功完成任务后点下方按钮"
android:text="打卡成功\n完成任务后点下方按钮"
android:textColor="@color/text_secondary"
android:textSize="16sp"
android:layout_marginTop="5dp" />
android:textSize="20sp"
android:gravity="center"
android:lineSpacingMultiplier="1.5"
android:layout_marginTop="8dp" />
</LinearLayout>
</LinearLayout>
@@ -257,7 +249,7 @@
android:gravity="center"
android:text="暂无任务"
android:textColor="@color/text_secondary"
android:textSize="24sp"
android:textSize="28sp"
android:paddingTop="80dp"
android:visibility="gone" />
@@ -281,14 +273,14 @@
android:layout_height="wrap_content"
android:text="加载中"
android:textColor="@color/text_secondary"
android:textSize="20sp"
android:textSize="22sp"
android:layout_marginTop="8dp" />
</LinearLayout>
</LinearLayout>
</ScrollView>
<!-- 底部固定操作按钮(大字+宽间距) -->
<!-- 底部操作按钮(大字+宽间距) -->
<TextView
android:id="@+id/btnAction"
android:layout_width="match_parent"