[UI] Better support for Immersive mode on notched devices
This commit is contained in:
parent
c6f6317839
commit
238c54c6fb
3 changed files with 6 additions and 2 deletions
|
@ -17,6 +17,7 @@ package code.name.monkey.retromusic.activities.base
|
|||
import android.content.Context
|
||||
import android.content.res.Resources
|
||||
import android.graphics.Color
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.view.KeyEvent
|
||||
|
@ -200,6 +201,9 @@ abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable {
|
|||
WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
|
||||
hide(WindowInsetsCompat.Type.systemBars())
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
window.attributes.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue