From 9b32fbc66c8f1bef1b837fd1b5171270689d26ca Mon Sep 17 00:00:00 2001 From: xiaojie Date: Thu, 12 Dec 2024 17:25:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8F=E8=A7=88=E7=94=BB?= =?UTF-8?q?=E5=BB=8A=E6=97=B6=E5=85=A8=E5=B1=8F=E6=A8=A1=E5=BC=8F=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=85=B3=E9=97=AD=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hippo/ehviewer/ui/GalleryActivity.java | 16 ++++++++++++---- app/src/main/res/values/themes.xml | 6 +++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/hippo/ehviewer/ui/GalleryActivity.java b/app/src/main/java/com/hippo/ehviewer/ui/GalleryActivity.java index 73595bcc2..b3db1783c 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/GalleryActivity.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/GalleryActivity.java @@ -43,6 +43,7 @@ import android.view.MotionEvent; import android.view.View; import android.view.Window; +import android.view.WindowInsets; import android.view.WindowManager; import android.webkit.MimeTypeMap; import android.widget.CompoundButton; @@ -58,6 +59,10 @@ import androidx.annotation.Nullable; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.widget.SwitchCompat; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowCompat; +import androidx.core.view.WindowInsetsCompat; +import androidx.core.view.WindowInsetsControllerCompat; import com.hippo.android.resource.AttrResources; import com.hippo.ehviewer.AppConfig; @@ -387,9 +392,12 @@ private void onCreateView(@Nullable Bundle savedInstanceState) { // System UI helper if (Settings.getReadingFullscreen()) { - int systemUiLevel; - systemUiLevel = SystemUiHelper.LEVEL_IMMERSIVE; - mSystemUiHelper = new SystemUiHelper(this, systemUiLevel, + Window w = getWindow(); + w.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, + WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION); + w.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, + WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); + mSystemUiHelper = new SystemUiHelper(this, SystemUiHelper.LEVEL_IMMERSIVE, SystemUiHelper.FLAG_LAYOUT_IN_SCREEN_OLDER_DEVICES | SystemUiHelper.FLAG_IMMERSIVE_STICKY); mSystemUiHelper.hide(); mShowSystemUi = false; @@ -655,7 +663,7 @@ private void autoRead(View view) { long initialDelay = Settings.getStartTransferTime(); long waitTime = initialDelay * 2L; try { - transferService.scheduleAtFixedRate( + transferService.scheduleWithFixedDelay( () -> transHandle.post(() -> { if (mGalleryView == null) { return; diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 2ac202977..d9a01b29c 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -223,10 +223,10 @@