2026-11-29 13:54:10 +08:00
|
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
|
<!--
|
|
|
|
|
|
锁屏全屏倒计时·横屏专属排版(区别于竖屏的纯纵向堆叠):
|
2026-11-30 00:44:14 +08:00
|
|
|
|
左右对称分栏——左侧倒计时(大)+ 任务名,右侧时钟(大)+ 日期星期,
|
|
|
|
|
|
两侧主字号统一 130sp,视觉左右对应;无「工作中/休息中」提示。
|
|
|
|
|
|
|
|
|
|
|
|
分割线:保持最初可见版本的原始实现——静态 View 直接放在两栏之间,
|
|
|
|
|
|
固定 dp 高度,无任何运行时改动(此前的 View.post / fontMetrics /
|
|
|
|
|
|
match_parent 结构化三版方案在锁屏/悬浮窗链路上全部失效)。
|
|
|
|
|
|
高度 150dp ≈ 130sp 时间文字的墨迹高度(1.17 × 130sp),仅分割两块大时间。
|
2026-11-29 13:54:10 +08:00
|
|
|
|
-->
|
|
|
|
|
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
|
|
|
android:id="@+id/lockRoot"
|
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
|
android:background="@android:color/black"
|
|
|
|
|
|
android:clickable="true"
|
|
|
|
|
|
android:focusable="true"
|
2026-11-30 00:44:14 +08:00
|
|
|
|
android:gravity="center_vertical"
|
|
|
|
|
|
android:orientation="horizontal">
|
2026-11-29 13:54:10 +08:00
|
|
|
|
|
2026-11-30 00:44:14 +08:00
|
|
|
|
<!-- 左:倒计时 + 任务名 -->
|
2026-11-29 13:54:10 +08:00
|
|
|
|
<LinearLayout
|
2026-11-30 00:44:14 +08:00
|
|
|
|
android:layout_width="0dp"
|
2026-11-29 13:54:10 +08:00
|
|
|
|
android:layout_height="wrap_content"
|
2026-11-30 00:44:14 +08:00
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
|
android:gravity="center"
|
|
|
|
|
|
android:orientation="vertical">
|
2026-11-29 13:54:10 +08:00
|
|
|
|
|
2026-11-30 00:44:14 +08:00
|
|
|
|
<TextView
|
|
|
|
|
|
android:id="@+id/tvLockCountdown"
|
|
|
|
|
|
android:layout_width="wrap_content"
|
2026-11-29 13:54:10 +08:00
|
|
|
|
android:layout_height="wrap_content"
|
2026-11-30 00:44:14 +08:00
|
|
|
|
android:includeFontPadding="false"
|
|
|
|
|
|
android:textColor="#FFFFFF"
|
|
|
|
|
|
android:textSize="130sp"
|
|
|
|
|
|
android:textStyle="bold" />
|
2026-11-30 00:28:57 +08:00
|
|
|
|
|
2026-11-30 00:44:14 +08:00
|
|
|
|
<TextView
|
|
|
|
|
|
android:id="@+id/tvLockTask"
|
|
|
|
|
|
android:layout_width="wrap_content"
|
2026-11-29 13:54:10 +08:00
|
|
|
|
android:layout_height="wrap_content"
|
2026-11-30 00:44:14 +08:00
|
|
|
|
android:layout_marginTop="10dp"
|
|
|
|
|
|
android:ellipsize="end"
|
|
|
|
|
|
android:maxWidth="320dp"
|
|
|
|
|
|
android:maxLines="1"
|
|
|
|
|
|
android:textColor="#99FFFFFF"
|
|
|
|
|
|
android:textSize="15sp" />
|
2026-11-30 00:28:57 +08:00
|
|
|
|
</LinearLayout>
|
2026-11-29 13:54:10 +08:00
|
|
|
|
|
2026-11-30 00:44:14 +08:00
|
|
|
|
<!-- 中:细分隔线(仅分割两块大时间,150dp≈130sp 文字墨迹高度) -->
|
|
|
|
|
|
<View
|
|
|
|
|
|
android:id="@+id/lockDivider"
|
|
|
|
|
|
android:layout_width="1dp"
|
|
|
|
|
|
android:layout_height="150dp"
|
|
|
|
|
|
android:background="#26FFFFFF" />
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 右:时钟(大)+ 日期星期在时钟下面 -->
|
2026-11-29 13:54:10 +08:00
|
|
|
|
<LinearLayout
|
2026-11-30 00:44:14 +08:00
|
|
|
|
android:layout_width="0dp"
|
2026-11-29 13:54:10 +08:00
|
|
|
|
android:layout_height="wrap_content"
|
2026-11-30 00:44:14 +08:00
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
|
android:gravity="center"
|
|
|
|
|
|
android:orientation="vertical">
|
2026-11-29 13:54:10 +08:00
|
|
|
|
|
2026-11-30 00:44:14 +08:00
|
|
|
|
<TextView
|
|
|
|
|
|
android:id="@+id/tvLockClock"
|
|
|
|
|
|
android:layout_width="wrap_content"
|
2026-11-29 13:54:10 +08:00
|
|
|
|
android:layout_height="wrap_content"
|
2026-11-30 00:44:14 +08:00
|
|
|
|
android:includeFontPadding="false"
|
|
|
|
|
|
android:textColor="#FFFFFF"
|
|
|
|
|
|
android:textSize="130sp"
|
|
|
|
|
|
android:textStyle="bold" />
|
2026-11-30 00:28:57 +08:00
|
|
|
|
|
2026-11-30 00:44:14 +08:00
|
|
|
|
<TextView
|
|
|
|
|
|
android:id="@+id/tvLockDate"
|
|
|
|
|
|
android:layout_width="wrap_content"
|
2026-11-29 13:54:10 +08:00
|
|
|
|
android:layout_height="wrap_content"
|
2026-11-30 00:44:14 +08:00
|
|
|
|
android:layout_marginTop="10dp"
|
|
|
|
|
|
android:textColor="#99FFFFFF"
|
|
|
|
|
|
android:textSize="15sp" />
|
2026-11-29 13:54:10 +08:00
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
|
|
</LinearLayout>
|