feat: 考勤面板UI优化(5项改进)
1. 打卡状态文字:显示"已上班 07:02"/"已下班 17:05" 2. NFC扫描倒计时:显示"请贴近信标(8s)" 3. 底部收回指示条:灰色短横线,点击可收回面板 4. 药丸形按钮:大圆角28dp + 蓝色渐变(源码#4CBAF1→#339AFB) 5. 撤销按钮主次分明:窄灰底红字(0.4) + 宽蓝色下班(0.6) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
android:paddingStart="28dp"
|
||||
android:paddingTop="27dp"
|
||||
android:paddingEnd="28dp"
|
||||
android:paddingBottom="20dp">
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<!-- 时间显示(大字体,老年用户) -->
|
||||
<TextView
|
||||
@@ -37,13 +37,23 @@
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="48sp" />
|
||||
|
||||
<!-- NFC 扫描提示(默认隐藏) -->
|
||||
<!-- 考勤状态文字:"已上班 07:02" / "已下班 17:05"(默认隐藏) -->
|
||||
<TextView
|
||||
android:id="@+id/tvPunchStatus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="@color/success"
|
||||
android:textSize="16sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- NFC 扫描提示 + 倒计时(默认隐藏) -->
|
||||
<TextView
|
||||
android:id="@+id/tvNfcHint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="请将手表贴近打卡信标"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="请贴近信标"
|
||||
android:textColor="@color/warning"
|
||||
android:textSize="18sp"
|
||||
android:visibility="gone" />
|
||||
@@ -57,48 +67,56 @@
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 上班打卡按钮 -->
|
||||
<!-- 上班打卡按钮(药丸形,蓝色渐变) -->
|
||||
<TextView
|
||||
android:id="@+id/btnPunchIn"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_btn_primary"
|
||||
android:background="@drawable/bg_btn_pill_blue"
|
||||
android:gravity="center"
|
||||
android:text="上班打卡"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="20sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- 下班打卡按钮 -->
|
||||
<!-- 撤销打卡按钮(窄,灰底红字) -->
|
||||
<TextView
|
||||
android:id="@+id/btnRevoke"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_weight="0.4"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@drawable/bg_btn_pill_gray"
|
||||
android:gravity="center"
|
||||
android:text="撤销"
|
||||
android:textColor="@color/error"
|
||||
android:textSize="18sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- 下班打卡按钮(宽,蓝色渐变) -->
|
||||
<TextView
|
||||
android:id="@+id/btnPunchOut"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_btn_primary"
|
||||
android:layout_weight="0.6"
|
||||
android:background="@drawable/bg_btn_pill_blue"
|
||||
android:gravity="center"
|
||||
android:text="下班打卡"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="20sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- 撤销打卡按钮 -->
|
||||
<TextView
|
||||
android:id="@+id/btnRevoke"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@drawable/bg_btn_secondary"
|
||||
android:gravity="center"
|
||||
android:text="撤销打卡"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="18sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 底部收回指示条 -->
|
||||
<View
|
||||
android:id="@+id/dismissBar"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="4dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/bg_dismiss_bar" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
Reference in New Issue
Block a user