We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8870cc3 + 7d18ab5 commit 2fae37fCopy full SHA for 2fae37f
android/src/main/java/com/navigationmode/NavigationModeModule.kt
@@ -30,7 +30,7 @@ class NavigationModeModule(reactContext: ReactApplicationContext) :
30
if (activity != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
31
val insets = activity.window.decorView.rootWindowInsets
32
if (insets != null) {
33
- val navBar = insets.getInsets(WindowInsets.Type.navigationBars())
+ val navBar = insets.getInsets(WindowInsets.Type.navigationBars()) ?: return 0
34
return (navBar.bottom / density).toInt() // Convert pixels to dp
35
}
36
0 commit comments