From 17610252c0fb68423b4d495ae01b981deab2c863 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 10 Apr 2022 16:21:32 +0200 Subject: [PATCH] make sure we always use white system icons at fullscreen view --- .../gallery/pro/activities/PanoramaPhotoActivity.kt | 6 ++++++ .../gallery/pro/activities/PanoramaVideoActivity.kt | 6 ++++++ .../gallery/pro/activities/ViewPagerActivity.kt | 9 +++++---- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PanoramaPhotoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PanoramaPhotoActivity.kt index e8b3dad26..f72900572 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PanoramaPhotoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PanoramaPhotoActivity.kt @@ -8,11 +8,13 @@ import android.net.Uri import android.os.Bundle import android.view.View import android.view.Window +import android.view.WindowInsetsController import android.widget.RelativeLayout import com.google.vr.sdk.widgets.pano.VrPanoramaEventListener import com.google.vr.sdk.widgets.pano.VrPanoramaView import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.ensureBackgroundThread +import com.simplemobiletools.commons.helpers.isRPlus import com.simplemobiletools.gallery.pro.R import com.simplemobiletools.gallery.pro.extensions.config import com.simplemobiletools.gallery.pro.extensions.hideSystemUI @@ -48,6 +50,10 @@ open class PanoramaPhotoActivity : SimpleActivity() { } checkIntent() + + if (isRPlus()) { + window.insetsController?.setSystemBarsAppearance(0, WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS) + } } override fun onResume() { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PanoramaVideoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PanoramaVideoActivity.kt index a1dc97ee1..22352518d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PanoramaVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PanoramaVideoActivity.kt @@ -7,12 +7,14 @@ import android.os.Bundle import android.os.Handler import android.view.View import android.view.Window +import android.view.WindowInsetsController import android.view.WindowManager import android.widget.RelativeLayout import android.widget.SeekBar import com.google.vr.sdk.widgets.video.VrVideoEventListener import com.google.vr.sdk.widgets.video.VrVideoView import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.commons.helpers.isRPlus import com.simplemobiletools.gallery.pro.R import com.simplemobiletools.gallery.pro.extensions.config import com.simplemobiletools.gallery.pro.extensions.hasNavBar @@ -47,6 +49,10 @@ open class PanoramaVideoActivity : SimpleActivity(), SeekBar.OnSeekBarChangeList checkNotchSupport() checkIntent() + + if (isRPlus()) { + window.insetsController?.setSystemBarsAppearance(0, WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS) + } } override fun onResume() { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt index c58a5c480..f73b68887 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt @@ -21,10 +21,7 @@ import android.os.Build import android.os.Bundle import android.os.Handler import android.provider.MediaStore.Images -import android.view.Menu -import android.view.MenuItem -import android.view.View -import android.view.WindowManager +import android.view.* import android.view.animation.DecelerateInterpolator import android.widget.Toast import androidx.exifinterface.media.ExifInterface @@ -105,6 +102,10 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } initFavorites() + + if (isRPlus()) { + window.insetsController?.setSystemBarsAppearance(0, WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS) + } } override fun onResume() {