新增锁屏全屏倒计时:计时中锁屏亮屏即全屏显示日期/时钟/倒计时/任务(v0.16)
This commit is contained in:
70
src/main/res/layout/activity_lock_screen.xml
Normal file
70
src/main/res/layout/activity_lock_screen.xml
Normal file
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 锁屏全屏倒计时:纯黑底极简排版,只有日期/时钟/倒计时/任务 -->
|
||||
<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"
|
||||
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"
|
||||
android:letterSpacing="0.08" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLockClock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="#CCFFFFFF"
|
||||
android:textSize="52sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLockCountdown"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="56dp"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="96sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLockMode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:letterSpacing="0.2"
|
||||
android:textColor="#66FFFFFF"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLockTask"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:ellipsize="end"
|
||||
android:maxWidth="280dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="#CCFFFFFF"
|
||||
android:textSize="17sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLockHint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="64dp"
|
||||
android:text="@string/lock_hint"
|
||||
android:textColor="#40FFFFFF"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -187,6 +187,10 @@
|
||||
<string name="sound">结束提示音</string>
|
||||
<string name="vibrate">振动</string>
|
||||
<string name="keep_screen_on">计时时保持屏幕常亮</string>
|
||||
<string name="lock_fullscreen_title">锁屏全屏倒计时</string>
|
||||
<string name="lock_mode_focus">专注中</string>
|
||||
<string name="lock_mode_break">休息中</string>
|
||||
<string name="lock_hint">点按任意处退出 · 倒计时在后台继续</string>
|
||||
<string name="daily_goal">每日目标</string>
|
||||
<string name="theme">深浅色</string>
|
||||
<string name="theme_follow">跟随系统</string>
|
||||
|
||||
@@ -17,6 +17,15 @@
|
||||
<item name="android:colorControlHighlight">@color/ripple_surface</item>
|
||||
</style>
|
||||
|
||||
<!-- 锁屏全屏倒计时页:纯黑底、白色字,不随深浅色主题切换 -->
|
||||
<style name="LockScreenTheme" parent="Theme.AppCompat.NoActionBar">
|
||||
<item name="android:windowBackground">@android:color/black</item>
|
||||
<item name="android:statusBarColor">@android:color/black</item>
|
||||
<item name="android:navigationBarColor">@android:color/black</item>
|
||||
<item name="android:windowLightStatusBar">false</item>
|
||||
<item name="android:windowLightNavigationBar" tools:targetApi="27">false</item>
|
||||
</style>
|
||||
|
||||
<!--
|
||||
样式名里的点号会被 aapt 当作隐式父样式(T.Title 的父是 T),
|
||||
这里必须先声明空的 T,否则资源链接直接报 style/T not found。
|
||||
|
||||
Reference in New Issue
Block a user