- 详情页右侧悬浮播放按钮(36dp半透明圆形) - 播报内容:任务名+地点+时间+积分(>0)+备注,空字段跳过 - 播放中按钮高亮+图标切换,再点停止 - 离开页面自动停止播放 - TTS播放期间抑制提示音,避免叠加 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
131 lines
5.1 KiB
XML
131 lines
5.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- 任务详情页:ScrollView 信息 + 底部固定操作按钮 -->
|
||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="match_parent"
|
||
android:background="@color/background">
|
||
|
||
<!-- 可滚动内容区(底部留出按钮空间) -->
|
||
<ScrollView
|
||
android:layout_width="match_parent"
|
||
android:layout_height="match_parent"
|
||
android:scrollbars="none"
|
||
android:paddingStart="21dp"
|
||
android:paddingTop="27dp"
|
||
android:paddingEnd="21dp"
|
||
android:paddingBottom="72dp"
|
||
android:clipToPadding="false">
|
||
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:orientation="vertical">
|
||
|
||
<!-- 页面头部:返回 + 标题 -->
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:gravity="center_vertical"
|
||
android:layout_marginBottom="8dp">
|
||
|
||
<TextView
|
||
android:id="@+id/btnBack"
|
||
android:layout_width="64dp"
|
||
android:layout_height="match_parent"
|
||
android:gravity="center"
|
||
android:text="‹"
|
||
android:textColor="@color/primary"
|
||
android:textSize="27sp" />
|
||
|
||
<TextView
|
||
android:layout_width="0dp"
|
||
android:layout_height="wrap_content"
|
||
android:layout_weight="1"
|
||
android:gravity="center"
|
||
android:text="任务详情"
|
||
android:textColor="@color/text_primary"
|
||
android:textSize="20sp"
|
||
android:textStyle="bold"
|
||
android:layout_marginEnd="32dp" />
|
||
|
||
</LinearLayout>
|
||
|
||
<!-- 任务信息行 -->
|
||
<LinearLayout style="@style/ConfigRow">
|
||
<TextView style="@style/ConfigLabel" android:text="任务" />
|
||
<TextView android:id="@+id/tvTaskName" style="@style/ConfigValue" />
|
||
</LinearLayout>
|
||
|
||
<LinearLayout style="@style/ConfigRow">
|
||
<TextView style="@style/ConfigLabel" android:text="编号" />
|
||
<TextView android:id="@+id/tvTaskNo" style="@style/ConfigValue"
|
||
android:textColor="@color/text_secondary" android:textSize="15sp" />
|
||
</LinearLayout>
|
||
|
||
<LinearLayout style="@style/ConfigRow">
|
||
<TextView style="@style/ConfigLabel" android:text="地点" />
|
||
<TextView android:id="@+id/tvPosition" style="@style/ConfigValue"
|
||
android:textColor="@color/primary" />
|
||
</LinearLayout>
|
||
|
||
<LinearLayout style="@style/ConfigRow">
|
||
<TextView style="@style/ConfigLabel" android:text="积分" />
|
||
<TextView android:id="@+id/tvPoints" style="@style/ConfigValue"
|
||
android:textColor="@color/warning" />
|
||
</LinearLayout>
|
||
|
||
<LinearLayout style="@style/ConfigRow">
|
||
<TextView style="@style/ConfigLabel" android:text="派单" />
|
||
<TextView android:id="@+id/tvTime" style="@style/ConfigValue" />
|
||
</LinearLayout>
|
||
|
||
<LinearLayout style="@style/ConfigRow">
|
||
<TextView style="@style/ConfigLabel" android:text="状态" />
|
||
<TextView android:id="@+id/tvStatus" style="@style/ConfigValue" />
|
||
</LinearLayout>
|
||
|
||
<!-- 提示条(待打卡+有场景时显示) -->
|
||
<TextView
|
||
android:id="@+id/tvHint"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:gravity="center"
|
||
android:padding="11dp"
|
||
android:text="请将手表贴近打卡信标"
|
||
android:textColor="@color/warning"
|
||
android:textSize="16sp"
|
||
android:textStyle="bold"
|
||
android:visibility="gone" />
|
||
|
||
</LinearLayout>
|
||
|
||
</ScrollView>
|
||
|
||
<!-- TTS 语音播报悬浮按钮:右侧垂直居中,36dp 圆形,触摸区 44dp -->
|
||
<ImageView
|
||
android:id="@+id/btnTts"
|
||
android:layout_width="36dp"
|
||
android:layout_height="36dp"
|
||
android:layout_gravity="center_vertical|end"
|
||
android:layout_marginEnd="8dp"
|
||
android:padding="6dp"
|
||
android:src="@drawable/ic_speaker"
|
||
android:background="@drawable/bg_tts_button"
|
||
android:contentDescription="语音播报" />
|
||
|
||
<!-- 底部固定操作按钮 -->
|
||
<TextView
|
||
android:id="@+id/btnAction"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_gravity="bottom"
|
||
android:gravity="center"
|
||
android:paddingTop="10dp"
|
||
android:paddingBottom="10dp"
|
||
android:textColor="@color/text_primary"
|
||
android:textSize="28sp"
|
||
android:textStyle="bold"
|
||
android:letterSpacing="0.05" />
|
||
|
||
</FrameLayout>
|