File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
android/src/main/java/com/swmansion/rnscreens/gamma/tabs Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,7 @@ class TabsHost(
194194 }
195195
196196 var tabBarHidden: Boolean by Delegates .observable(false ) { _, oldValue, newValue ->
197+ updateInterfaceInsets()
197198 updateNavigationMenuIfNeeded(oldValue, newValue)
198199 }
199200
@@ -495,9 +496,15 @@ class TabsHost(
495496 val newHeight = bottom - top
496497
497498 if (newHeight != oldHeight) {
498- interfaceInsetsChangeListener?.apply {
499- this .onInterfaceInsetsChange(EdgeInsets (0.0f , 0.0f , 0.0f , newHeight.toFloat()))
500- }
499+ updateInterfaceInsets(newHeight)
500+ }
501+ }
502+
503+ private fun updateInterfaceInsets (newHeight : Int? = null) {
504+ val height = if (tabBarHidden) 0 else (newHeight ? : bottomNavigationView.height)
505+
506+ interfaceInsetsChangeListener?.apply {
507+ this .onInterfaceInsetsChange(EdgeInsets (0.0f , 0.0f , 0.0f , height.toFloat()))
501508 }
502509 }
503510
You can’t perform that action at this time.
0 commit comments