File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
packages/react-native-bottom-tabs
android/src/main/java/com/rcttabview Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ import com.google.android.material.navigation.NavigationBarView.LABEL_VISIBILITY
3535import com.google.android.material.transition.platform.MaterialFadeThrough
3636
3737class ReactBottomNavigationView (context : Context ) : LinearLayout(context) {
38- private var bottomNavigation = BottomNavigationView (context)
38+ private var bottomNavigation = ExtendedBottomNavigationView (context)
3939 val layoutHolder = FrameLayout (context)
4040
4141 var onTabSelectedListener: ((key: String ) -> Unit )? = null
@@ -456,11 +456,17 @@ class ReactBottomNavigationView(context: Context) : LinearLayout(context) {
456456 // React Native opts out ouf Activity re-creation when configuration changes, this workarounds that.
457457 // We also opt-out of this recreation when custom styles are used.
458458 removeView(bottomNavigation)
459- bottomNavigation = BottomNavigationView (context)
459+ bottomNavigation = ExtendedBottomNavigationView (context)
460460 addView(bottomNavigation)
461461 updateItems(items)
462462 setLabeled(this .labeled)
463463 this .selectedItem?.let { setSelectedItem(it) }
464464 uiModeConfiguration = newConfig?.uiMode ? : uiModeConfiguration
465465 }
466466}
467+
468+ class ExtendedBottomNavigationView (context : Context ) : BottomNavigationView(context) {
469+ override fun getMaxItemCount (): Int {
470+ return 1_000
471+ }
472+ }
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ interface Props<Route extends BaseRoute> {
162162 } ;
163163}
164164
165- const ANDROID_MAX_TABS = 6 ;
165+ const ANDROID_MAX_TABS = 1_000 ;
166166
167167const TabView = < Route extends BaseRoute > ( {
168168 navigationState,
You can’t perform that action at this time.
0 commit comments