From c40cb542f6fce5c655a236483be77a415a521a61 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 28 Oct 2018 20:55:40 +0100 Subject: [PATCH] fix glitchy fullscreen toggling at PhotoVideo activity --- .../gallery/activities/PhotoVideoActivity.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt index 5a2cafd4b..db5f17b03 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt @@ -9,11 +9,13 @@ import android.os.Bundle import android.view.Menu import android.view.MenuItem import android.view.View +import android.view.WindowManager import com.simplemobiletools.commons.dialogs.PropertiesDialog import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.IS_FROM_GALLERY import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE import com.simplemobiletools.commons.helpers.REAL_FILE_PATH +import com.simplemobiletools.commons.helpers.isPiePlus import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.extensions.* import com.simplemobiletools.gallery.fragments.PhotoFragment @@ -83,6 +85,11 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList } } + if (isPiePlus()) { + window.attributes.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES + window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) + } + showSystemUI(true) val bundle = Bundle() val file = File(mUri.toString())