全屏深色遮罩 + 大圆圈图标,属性动画弹出+淡出,1.5秒自动消失。 - 成功:绿色圆圈 + ✓,OvershootInterpolator 回弹效果 - 失败:红色圆圈 + ✗ - 替代 QuTipDialog 用于 NFC 打卡和按钮操作的结果反馈 - 所有操作统一视觉风格 应用到: - TaskDetailFragment NFC 打卡 - TaskListFragment NFC 打卡 - MainActivity 返回键主动打卡 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
51 lines
2.1 KiB
XML
51 lines
2.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- MainActivity 布局:NavBar 已移入各 Fragment 自行管理
|
||
只保留 NavHostFragment(主内容)和 dialog_container(全局弹窗层) -->
|
||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||
xmlns:tools="http://schemas.android.com/tools"
|
||
android:id="@+id/main"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="match_parent"
|
||
android:background="@color/background"
|
||
tools:context=".app.MainActivity">
|
||
|
||
<!-- Layer 1: 主内容区(NavHostFragment) -->
|
||
<androidx.fragment.app.FragmentContainerView
|
||
android:id="@+id/nav_host_fragment"
|
||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="match_parent"
|
||
app:defaultNavHost="true"
|
||
app:navGraph="@navigation/nav_main" />
|
||
|
||
<!-- Layer 2: 通知横幅(所有 Fragment 之上,MQTT 新任务时显示) -->
|
||
<com.xiaoqu.watch.ui.widget.NotificationBannerView
|
||
android:id="@+id/notificationBanner"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_gravity="top" />
|
||
|
||
<!-- Layer 3: 全局弹窗层(QuTipDialog / QuConfirmDialog 动态添加,默认隐藏) -->
|
||
<FrameLayout
|
||
android:id="@+id/dialog_container"
|
||
android:layout_width="match_parent"
|
||
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 更新弹窗(最顶层,全屏覆盖,默认隐藏) -->
|
||
<com.xiaoqu.watch.ui.widget.UpdateDialogView
|
||
android:id="@+id/updateDialog"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="match_parent"
|
||
android:visibility="gone" />
|
||
|
||
</FrameLayout>
|