Fix bottom sheets sometimes hovering over nav bar

Happens when the keyboard shows and on some sheets in android 12 (yes I have a device on dev preview)
This commit is contained in:
Jays2Kings 2021-03-24 20:14:38 -04:00
parent 999247d7dd
commit 6fc845e303

View File

@ -254,6 +254,8 @@ fun BottomSheetDialog.setEdgeToEdge(
window?.decorView?.systemUiVisibility = View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
window?.findViewById<View>(com.google.android.material.R.id.container)?.fitsSystemWindows =
false
window?.findViewById<View>(com.google.android.material.R.id.coordinator)?.fitsSystemWindows =
false
contentView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View
.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION