adding some extra checks to navigation bar sizes
This commit is contained in:
parent
09709c1ce8
commit
1fcf1ebded
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue