refactor: 优化 QuTipDialog + 删除 ResultFlashView

QuTipDialog 优化:
- 图标区域放大 85→110dp,图标字号 38→50sp
- 加入淡入+缩放动画(OvershootInterpolator 回弹效果)
- 默认倒计时 3→2 秒
- 倒计时文字默认隐藏(showCountdown 参数控制)
- 简化调用:show(status, title) 即可,2秒后自动消失

NFC 打卡加回 QuTipDialog:
- 成功:绿色图标 + "打卡成功" + 2秒消失
- 失败:红色图标 + "打卡失败" + 错误信息

删除 ResultFlashView(方案不合适,统一用优化后的 QuTipDialog)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
dongliang
2026-05-06 15:40:07 +09:30
parent 1ef6824c5e
commit 3ab6a94676
9 changed files with 94 additions and 224 deletions

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 结果指示器圆形边框(默认绿色,代码中动态设置颜色) -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<stroke android:width="4dp" android:color="#4CAF50" />
</shape>

View File

@@ -33,14 +33,7 @@
android:layout_height="match_parent"
android:visibility="gone" />
<!-- Layer 4: 操作结果指示器Apple Watch 风格,弹出+淡出,默认隐藏) -->
<com.xiaoqu.watch.ui.widget.ResultFlashView
android:id="@+id/resultFlash"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
<!-- Layer 5: OTA 更新弹窗(最顶层,全屏覆盖,默认隐藏) -->
<!-- Layer 4: OTA 更新弹窗(最顶层,全屏覆盖,默认隐藏) -->
<com.xiaoqu.watch.ui.widget.UpdateDialogView
android:id="@+id/updateDialog"
android:layout_width="match_parent"

View File

@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- QuTipDialog反馈提示弹窗按原型图V3样式
圆形图标背景 + 标题 + 描述 + 倒计时 -->
<!-- QuTipDialog反馈提示弹窗优化版
圆形图标 + 标题,简洁清晰 -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background">
<LinearLayout
android:id="@+id/tipContent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
@@ -14,11 +15,11 @@
android:paddingStart="21dp"
android:paddingEnd="21dp">
<!-- 圆形图标背景(85dp -->
<!-- 圆形图标背景(放大 85→110dp -->
<FrameLayout
android:layout_width="85dp"
android:layout_height="85dp"
android:layout_marginBottom="19dp">
android:layout_width="110dp"
android:layout_height="110dp"
android:layout_marginBottom="16dp">
<View
android:id="@+id/tipIconBg"
@@ -30,7 +31,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="38sp" />
android:textSize="50sp" />
</FrameLayout>
@@ -43,7 +44,7 @@
android:textSize="28sp"
android:textStyle="bold" />
<!-- 描述20sp -->
<!-- 描述20sp,可选 -->
<TextView
android:id="@+id/tipDesc"
android:layout_width="wrap_content"
@@ -55,7 +56,7 @@
android:layout_marginTop="8dp"
android:visibility="gone" />
<!-- 倒计时 -->
<!-- 倒计时(隐藏,只在需要时显示) -->
<TextView
android:id="@+id/tipBackBtn"
android:layout_width="wrap_content"

View File

@@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 操作结果闪烁指示器(类 Apple Watch 风格)
全屏深色遮罩 + 中心大图标,属性动画弹出/淡出 -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#CC000000">
<!-- 中心图标容器(圆形背景 + 图标文字) -->
<FrameLayout
android:id="@+id/iconContainer"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center">
<!-- 圆形边框 -->
<View
android:id="@+id/circleRing"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_result_circle" />
<!-- ✓ 或 ✗ 图标 -->
<TextView
android:id="@+id/tvIcon"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textColor="@android:color/white"
android:textSize="48sp"
android:textStyle="bold" />
</FrameLayout>
</FrameLayout>