From 433711e0f19952b8f42ceb5b39693104e5daf4e8 Mon Sep 17 00:00:00 2001 From: Modificator Date: Mon, 27 Jan 2020 17:22:30 +0800 Subject: [PATCH] add e-ink mode --- app/src/main/java/io/legado/app/utils/ContextExtensions.kt | 3 +++ app/src/main/res/values/strings.xml | 3 ++- app/src/main/res/xml/pref_main.xml | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/utils/ContextExtensions.kt b/app/src/main/java/io/legado/app/utils/ContextExtensions.kt index 7b920dfa7..e53b33e30 100644 --- a/app/src/main/java/io/legado/app/utils/ContextExtensions.kt +++ b/app/src/main/java/io/legado/app/utils/ContextExtensions.kt @@ -129,5 +129,8 @@ fun Context.shareWithQr(title: String, text: String) { val Context.isNightTheme: Boolean get() = getPrefBoolean("isNightTheme") +val Context.isEInkMode: Boolean + get() = getPrefBoolean("isEInkMode") + val Context.isTransparentStatusBar: Boolean get() = getPrefBoolean("transparentStatusBar", true) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 12ceceb6d..d481ccdff 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -77,7 +77,7 @@ 共%s个Text文件 加载中… 重试 - Web服务 + Web 服务 web编辑书源 http://%s:%d 离线下载 @@ -447,6 +447,7 @@ 切换显示样式 导入本地书籍需存储权限 夜间模式 + E-Ink 模式 本软件需要存储权限来存储备份书籍信息 再按一次退出程序 导入本地书籍需存储权限 diff --git a/app/src/main/res/xml/pref_main.xml b/app/src/main/res/xml/pref_main.xml index 297298599..f59dff9f7 100644 --- a/app/src/main/res/xml/pref_main.xml +++ b/app/src/main/res/xml/pref_main.xml @@ -18,6 +18,12 @@ android:title="@string/night_theme" app:iconSpaceReserved="false" /> + +