From dbce1a2be8520fa262cf34a74af1870d500a7980 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 18 Feb 2020 19:47:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/ui/book/read/Help.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/io/legado/app/ui/book/read/Help.kt b/app/src/main/java/io/legado/app/ui/book/read/Help.kt index 939377cb1..a24d6e180 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/Help.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/Help.kt @@ -20,6 +20,9 @@ object Help { private const val NAVIGATION = "navigationBarBackground" + /** + * 更新状态栏,导航栏 + */ fun upSystemUiVisibility(activity: Activity, toolBarHide: Boolean = true) { var flag = (View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_STABLE @@ -70,6 +73,9 @@ object Help { return false } + /** + * 保持亮屏 + */ fun keepScreenOn(window: Window, on: Boolean) { if (on) { window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)