From 6a5186c51fc22f79aa686084dd35cfd85449eef5 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 2 Oct 2018 23:25:47 +0200 Subject: [PATCH] add notch support only from Android 9 --- app/build.gradle | 2 +- .../simplemobiletools/gallery/activities/ViewPagerActivity.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 80f656e07..f81e70df9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -43,7 +43,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:4.8.6' + implementation 'com.simplemobiletools:commons:4.8.7' implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0' implementation 'com.android.support:multidex:1.0.3' implementation 'it.sephiroth.android.exif:library:1.0.1' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt index 7604f2340..793c3b3b3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -84,7 +84,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View setContentView(R.layout.activity_medium) top_shadow.layoutParams.height = statusBarHeight + actionBarHeight - if (isOreoPlus()) { + if (isPiePlus()) { window.attributes.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) }