mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-01-30 15:35:07 +01:00
Merge pull request #94 from esensar/fix/73-notch-handling
Allow drawing under notches and system bars
This commit is contained in:
commit
45904bac9d
@ -30,6 +30,7 @@ import android.view.animation.DecelerateInterpolator
|
||||
import android.widget.PopupMenu
|
||||
import androidx.core.graphics.drawable.toBitmap
|
||||
import androidx.core.view.GestureDetectorCompat
|
||||
import androidx.core.view.WindowCompat
|
||||
import androidx.core.view.isVisible
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.*
|
||||
@ -85,9 +86,7 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||
|
||||
mDetector = GestureDetectorCompat(this, MyGestureListener(this))
|
||||
|
||||
if (isRPlus()) {
|
||||
window.setDecorFitsSystemWindows(false)
|
||||
}
|
||||
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||
|
||||
mScreenHeight = realScreenSize.y
|
||||
mAllAppsFragmentY = mScreenHeight
|
||||
@ -205,6 +204,7 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||
val addTopPadding = main_holder.rootWindowInsets?.displayCutout != null
|
||||
(all_apps_fragment as AllAppsFragment).setupViews(addTopPadding)
|
||||
(widgets_fragment as WidgetsFragment).setupViews(addTopPadding)
|
||||
updateStatusbarColor(Color.TRANSPARENT)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
||||
<item name="android:enforceNavigationBarContrast">false</item>
|
||||
<item name="android:enforceStatusBarContrast">false</item>
|
||||
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user