adding some extra checks to navigation bar sizes

This commit is contained in:
tibbi 2021-05-16 23:53:11 +02:00
parent 09709c1ce8
commit 1fcf1ebded

View file

@ -917,8 +917,8 @@ val Context.notificationManager: NotificationManager get() = getSystemService(Co
val Context.shortcutManager: ShortcutManager get() = getSystemService(ShortcutManager::class.java) as ShortcutManager
val Context.portrait get() = resources.configuration.orientation == Configuration.ORIENTATION_PORTRAIT
val Context.navigationBarRight: Boolean get() = usableScreenSize.x < realScreenSize.x
val Context.navigationBarBottom: Boolean get() = usableScreenSize.y < realScreenSize.y
val Context.navigationBarRight: Boolean get() = usableScreenSize.x < realScreenSize.x && usableScreenSize.x > usableScreenSize.y
val Context.navigationBarBottom: Boolean get() = usableScreenSize.y < realScreenSize.y && usableScreenSize.y > usableScreenSize.x
val Context.navigationBarHeight: Int get() = if (navigationBarBottom && navigationBarSize.y != usableScreenSize.y) navigationBarSize.y else 0
val Context.navigationBarWidth: Int get() = if (navigationBarRight) navigationBarSize.x else 0