diff --git a/.changeset/little-dingos-cough.md b/.changeset/little-dingos-cough.md new file mode 100644 index 00000000..4384a401 --- /dev/null +++ b/.changeset/little-dingos-cough.md @@ -0,0 +1,5 @@ +--- +'react-native-bottom-tabs': patch +--- + +fix: don't show a default tab bar on top of a custom one when changing theme diff --git a/packages/react-native-bottom-tabs/android/src/main/java/com/rcttabview/RCTTabView.kt b/packages/react-native-bottom-tabs/android/src/main/java/com/rcttabview/RCTTabView.kt index 390579ed..ab9b1dd6 100644 --- a/packages/react-native-bottom-tabs/android/src/main/java/com/rcttabview/RCTTabView.kt +++ b/packages/react-native-bottom-tabs/android/src/main/java/com/rcttabview/RCTTabView.kt @@ -458,6 +458,11 @@ class ReactBottomNavigationView(context: Context) : LinearLayout(context) { return } + // User has hidden the bottom navigation bar, don't re-attach it. + if (bottomNavigation.visibility == GONE) { + return + } + // If appearance wasn't changed re-create the bottom navigation view when configuration changes. // React Native opts out ouf Activity re-creation when configuration changes, this workarounds that. // We also opt-out of this recreation when custom styles are used.