feat: 考勤打卡模块(NFC)重新开发
基于新方法论(11层源码分析+独立评审)重新开发考勤打卡功能: - 首页下拉展开打卡面板,点击按钮开启NFC贴卡打卡 - 支持上班打卡、下班打卡、撤销打卡 - NFC超时自动关闭,音效反馈(4种planId) - MQTT type=5 上下班状态推送处理 - 按钮状态矩阵:onPunchState×offPunchState决定显示 新增: AttendanceStatus / PunchApi / PunchViewModel / PunchPanelView 修改: NetworkModule / HomeFragment / fragment_home.xml 删除: AttendanceInfo(被AttendanceStatus替代) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,26 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 首页容器:固定状态栏 + ViewPager2 左右滑动 -->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<!-- 首页容器:固定状态栏 + ViewPager2 + 打卡面板覆盖层 -->
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="21dp"
|
||||
android:paddingTop="27dp"
|
||||
android:paddingEnd="21dp">
|
||||
android:background="@color/background">
|
||||
|
||||
<!-- 固定状态栏 -->
|
||||
<com.xiaoqu.watch.ui.widget.StatusBarView
|
||||
android:id="@+id/statusBar"
|
||||
<!-- 主内容区 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginBottom="3dp" />
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="21dp"
|
||||
android:paddingTop="27dp"
|
||||
android:paddingEnd="21dp">
|
||||
|
||||
<!-- ViewPager2 -->
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewPager"
|
||||
<!-- 固定状态栏 -->
|
||||
<com.xiaoqu.watch.ui.widget.StatusBarView
|
||||
android:id="@+id/statusBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginBottom="3dp" />
|
||||
|
||||
<!-- ViewPager2 -->
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 考勤打卡面板(覆盖层,默认隐藏) -->
|
||||
<com.xiaoqu.watch.ui.punch.PunchPanelView
|
||||
android:id="@+id/punchPanel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
<!-- 弹窗容器(最顶层,用于 QuTipDialog) -->
|
||||
<FrameLayout
|
||||
android:id="@+id/dialogContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
Reference in New Issue
Block a user