You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have 5 bottomTabs in my application, where we support multiple languages. When changing to another language in the app, the bottom tabs text has to change accordingly. I have therefore tried to update all five tabs using mergeOptions, which works fine for iOS.
Worth mentioning: Only 3 of the 5 bottomTabs has a topBar. Android won't crash if I only update these two tabs.
Error logged:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: no.entur.debug, PID: 9573
java.lang.NullPointerException: Attempt to invoke virtual method 'int com.reactnativenavigation.viewcontrollers.topbar.TopBarController.getHeight()' on a null object reference
at com.reactnativenavigation.presentation.StackPresenter.getTopInset(StackPresenter.java:548)
at com.reactnativenavigation.viewcontrollers.stack.StackController.getTopInset(StackController.java:407)
at com.reactnativenavigation.viewcontrollers.ComponentViewController.lambda$getTopInset$0$ComponentViewController(ComponentViewController.java:106)
at com.reactnativenavigation.viewcontrollers.-$$Lambda$ComponentViewController$kPCPbxWkUW2nnI8TIQgM0jqvgY4.run(Unknown Source:4)
at com.reactnativenavigation.utils.ObjectUtils.perform(ObjectUtils.java:15)
at com.reactnativenavigation.viewcontrollers.ComponentViewController.getTopInset(ComponentViewController.java:106)
at com.reactnativenavigation.viewcontrollers.ComponentViewController.applyTopInset(ComponentViewController.java:100)
at com.reactnativenavigation.viewcontrollers.-$$Lambda$wlwFhgHcAClBnwsp5rN0pxte4i4.on(Unknown Source:2)
at com.reactnativenavigation.utils.CollectionUtils.forEach(CollectionUtils.java:93)
at com.reactnativenavigation.utils.CollectionUtils.forEach(CollectionUtils.java:76)
at com.reactnativenavigation.viewcontrollers.ParentController.applyTopInset(ParentController.java:159)
at com.reactnativenavigation.viewcontrollers.-$$Lambda$wlwFhgHcAClBnwsp5rN0pxte4i4.on(Unknown Source:2)
at com.reactnativenavigation.utils.CollectionUtils.forEach(CollectionUtils.java:93)
at com.reactnativenavigation.utils.CollectionUtils.forEach(CollectionUtils.java:76)
at com.reactnativenavigation.viewcontrollers.ParentController.applyTopInset(ParentController.java:159)
at com.reactnativenavigation.viewcontrollers.-$$Lambda$vVglzgYrWmnbpKcV_M9VjZiqrVQ.run(Unknown Source:2)
at com.reactnativenavigation.utils.ObjectUtils.perform(ObjectUtils.java:11)
at com.reactnativenavigation.viewcontrollers.ViewController.onMeasureChild(ViewController.java:348)
at com.reactnativenavigation.viewcontrollers.bottomtabs.BottomTabsController.onMeasureChild(BottomTabsController.java:181)
at com.reactnativenavigation.views.BehaviourDelegate.onMeasureChild(BehaviourDelegate.java:24)
at com.reactnativenavigation.views.BehaviourDelegate.onMeasureChild(BehaviourDelegate.java:9)
at androidx.coordinatorlayout.widget.CoordinatorLayout.onMeasure(CoordinatorLayout.java:831)
Steps to Reproduce / Code Snippets / Screenshots
I've used the following recommended code, as per the documentation, to update a a bottomTab:
Since I have to update all five tabs, I've assumed I had to run this mergeOptions for each tab. Seems kind of suboptimal to do this, but.. This works great on iOS, but crashes on Android. It works for a tab that doesn't have a topBar, but crashes if one does exist for that tab.
Environment
React Native Navigation version: v6.0.1
React Native version: v0.61.4
Platform(s) (iOS, Android, or both?): Android
Device info (Simulator/Device? OS version? Debug/Release?): Simulator (Debug)
The text was updated successfully, but these errors were encountered:
Issue Description
I have 5
bottomTabs
in my application, where we support multiple languages. When changing to another language in the app, the bottom tabs text has to change accordingly. I have therefore tried to update all five tabs usingmergeOptions
, which works fine for iOS.Worth mentioning: Only 3 of the 5
bottomTabs
has a topBar. Android won't crash if I only update these two tabs.Error logged:
Steps to Reproduce / Code Snippets / Screenshots
I've used the following recommended code, as per the documentation, to update a a
bottomTab
:Since I have to update all five tabs, I've assumed I had to run this
mergeOptions
for each tab. Seems kind of suboptimal to do this, but.. This works great on iOS, but crashes on Android. It works for a tab that doesn't have a topBar, but crashes if one does exist for that tab.Environment
The text was updated successfully, but these errors were encountered: