2026-11-29 13:54:10 +08:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
<!--
|
|
|
|
|
锁屏全屏倒计时·横屏专属排版(区别于竖屏的纯纵向堆叠):
|
2026-11-30 00:28:57 +08:00
|
|
|
上行是主行:倒计时 | 分割线 | 时钟,三者在同一行内,
|
|
|
|
|
分割线高度用 match_parent 直接继承行高——行高由两侧 130sp 大时间撑起,
|
|
|
|
|
所以线高天然与时间文字一致,纯 XML 结构保证,不依赖任何运行时代码
|
|
|
|
|
(此前两版运行时改高度的方案在锁屏/悬浮窗链路上都失效了)。
|
|
|
|
|
下行是副行:任务名 | 占位 | 日期星期,与上行两栏逐列对齐。
|
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:28:57 +08:00
|
|
|
android:gravity="center"
|
|
|
|
|
android:orientation="vertical">
|
2026-11-29 13:54:10 +08:00
|
|
|
|
2026-11-30 00:28:57 +08:00
|
|
|
<!-- 上行:倒计时 | 分割线 | 时钟(分割线高度=本行高度=时间文字高度) -->
|
2026-11-29 13:54:10 +08:00
|
|
|
<LinearLayout
|
2026-11-30 00:28:57 +08:00
|
|
|
android:layout_width="match_parent"
|
2026-11-29 13:54:10 +08:00
|
|
|
android:layout_height="wrap_content"
|
2026-11-30 00:28:57 +08:00
|
|
|
android:orientation="horizontal">
|
2026-11-29 13:54:10 +08:00
|
|
|
|
2026-11-30 00:28:57 +08:00
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="0dp"
|
2026-11-29 13:54:10 +08:00
|
|
|
android:layout_height="wrap_content"
|
2026-11-30 00:28:57 +08:00
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:gravity="center"
|
|
|
|
|
android:orientation="vertical">
|
2026-11-29 13:54:10 +08:00
|
|
|
|
2026-11-30 00:28:57 +08:00
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/tvLockCountdown"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:includeFontPadding="false"
|
|
|
|
|
android:textColor="#FFFFFF"
|
|
|
|
|
android:textSize="130sp"
|
|
|
|
|
android:textStyle="bold" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<View
|
|
|
|
|
android:id="@+id/lockDivider"
|
|
|
|
|
android:layout_width="1dp"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:background="#26FFFFFF" />
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="0dp"
|
2026-11-29 13:54:10 +08:00
|
|
|
android:layout_height="wrap_content"
|
2026-11-30 00:28:57 +08:00
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:gravity="center"
|
|
|
|
|
android:orientation="vertical">
|
2026-11-29 13:54:10 +08:00
|
|
|
|
2026-11-30 00:28:57 +08:00
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/tvLockClock"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:includeFontPadding="false"
|
|
|
|
|
android:textColor="#FFFFFF"
|
|
|
|
|
android:textSize="130sp"
|
|
|
|
|
android:textStyle="bold" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
</LinearLayout>
|
2026-11-29 13:54:10 +08:00
|
|
|
|
2026-11-30 00:28:57 +08:00
|
|
|
<!-- 下行:任务名 | 占位(与分割线同宽,保持两栏对齐) | 日期星期 -->
|
2026-11-29 13:54:10 +08:00
|
|
|
<LinearLayout
|
2026-11-30 00:28:57 +08:00
|
|
|
android:layout_width="match_parent"
|
2026-11-29 13:54:10 +08:00
|
|
|
android:layout_height="wrap_content"
|
2026-11-30 00:28:57 +08:00
|
|
|
android:layout_marginTop="10dp"
|
|
|
|
|
android:orientation="horizontal">
|
2026-11-29 13:54:10 +08:00
|
|
|
|
2026-11-30 00:28:57 +08:00
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="0dp"
|
2026-11-29 13:54:10 +08:00
|
|
|
android:layout_height="wrap_content"
|
2026-11-30 00:28:57 +08:00
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:gravity="center"
|
|
|
|
|
android:orientation="vertical">
|
2026-11-29 13:54:10 +08:00
|
|
|
|
2026-11-30 00:28:57 +08:00
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/tvLockTask"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:ellipsize="end"
|
|
|
|
|
android:maxWidth="320dp"
|
|
|
|
|
android:maxLines="1"
|
|
|
|
|
android:textColor="#99FFFFFF"
|
|
|
|
|
android:textSize="15sp" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<View
|
|
|
|
|
android:layout_width="1dp"
|
|
|
|
|
android:layout_height="match_parent" />
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="0dp"
|
2026-11-29 13:54:10 +08:00
|
|
|
android:layout_height="wrap_content"
|
2026-11-30 00:28:57 +08:00
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:gravity="center"
|
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/tvLockDate"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:textColor="#99FFFFFF"
|
|
|
|
|
android:textSize="15sp" />
|
|
|
|
|
</LinearLayout>
|
2026-11-29 13:54:10 +08:00
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
</LinearLayout>
|