Display cutout support

This commit is contained in:
Koitharu
2020-02-27 20:18:03 +02:00
parent f37e3aa9ab
commit 2405ca26cc

View File

@@ -1,8 +1,10 @@
package org.koitharu.kotatsu.ui.common
import android.graphics.Color
import android.os.Build
import android.os.Bundle
import android.view.View
import android.view.WindowManager
abstract class BaseFullscreenActivity : BaseActivity() {
@@ -13,6 +15,9 @@ abstract class BaseFullscreenActivity : BaseActivity() {
// addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
statusBarColor = Color.TRANSPARENT
navigationBarColor = Color.TRANSPARENT
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
attributes.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
}
}
showSystemUI()
}