Fixed bottom sheet peek height
This commit is contained in:
parent
e67c094320
commit
be917106a6
1 changed files with 2 additions and 1 deletions
|
@ -2,11 +2,12 @@ package code.name.monkey.retromusic.extensions
|
|||
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.RetroUtil
|
||||
|
||||
fun WindowInsetsCompat?.safeGetBottomInsets(): Int {
|
||||
return if (PreferenceUtil.isFullScreenMode) {
|
||||
return 0
|
||||
} else {
|
||||
this?.getInsets(WindowInsetsCompat.Type.systemBars())?.bottom ?: 0
|
||||
this?.getInsets(WindowInsetsCompat.Type.systemBars())?.bottom ?: RetroUtil.getNavigationBarHeight()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue