Skip to content

Commit add5943

Browse files
authored
fix: don't show default tab bar when channing theme and using a custom one (#347)
1 parent 8882434 commit add5943

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.changeset/little-dingos-cough.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'react-native-bottom-tabs': patch
3+
---
4+
5+
fix: don't show a default tab bar on top of a custom one when changing theme

packages/react-native-bottom-tabs/android/src/main/java/com/rcttabview/RCTTabView.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,11 @@ class ReactBottomNavigationView(context: Context) : LinearLayout(context) {
458458
return
459459
}
460460

461+
// User has hidden the bottom navigation bar, don't re-attach it.
462+
if (bottomNavigation.visibility == GONE) {
463+
return
464+
}
465+
461466
// If appearance wasn't changed re-create the bottom navigation view when configuration changes.
462467
// React Native opts out ouf Activity re-creation when configuration changes, this workarounds that.
463468
// We also opt-out of this recreation when custom styles are used.

0 commit comments

Comments
 (0)