项目排序模式序号与置顶;横屏锁屏遮状态栏、排版对称化;版本 1.2

This commit is contained in:
XIGE
2026-11-29 14:20:09 +08:00
parent bc01e0ac67
commit fd674322a1
11 changed files with 140 additions and 42 deletions

View File

@@ -51,7 +51,6 @@ class LockScreenActivity : AppCompatActivity() {
private lateinit var tvDate: TextView
private lateinit var tvClock: TextView
private lateinit var tvCountdown: TextView
private lateinit var tvMode: TextView
private lateinit var tvTask: TextView
private val clockFmt = SimpleDateFormat("HH:mm", Locale.getDefault())
@@ -86,11 +85,12 @@ class LockScreenActivity : AppCompatActivity() {
tvDate = findViewById(R.id.tvLockDate)
tvClock = findViewById(R.id.tvLockClock)
tvCountdown = findViewById(R.id.tvLockCountdown)
tvMode = findViewById(R.id.tvLockMode)
tvTask = findViewById(R.id.tvLockTask)
findViewById<View>(R.id.lockRoot).setOnClickListener { finish() }
applyImmersive()
ContextCompat.registerReceiver(
this,
unlockReceiver,
@@ -156,7 +156,8 @@ class LockScreenActivity : AppCompatActivity() {
tvClock.text = clockFmt.format(cal.time)
tvCountdown.text = Dates.clock(now)
tvMode.text = getString(
// 工作中/休息中提示只有竖屏布局有(横屏排版里删掉了),横屏下 findViewById 返回 null
findViewById<TextView>(R.id.tvLockMode)?.text = getString(
if (TimerCore.mode == TimerCore.MODE_FOCUS) R.string.lock_mode_focus else R.string.lock_mode_break
)