Created
September 24, 2020 10:44
-
-
Save milhauscz/396df01ac570759f97192192af3e56fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Should be called from [Activity.onCreate]. | |
* @see hideSystemUI | |
* @see showSystemUI | |
*/ | |
fun Activity.showBelowCutout() { | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { | |
window.attributes.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment