Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-native-tab-view not working on Android when nested in a flux tab #2427

Closed
tasharofi opened this issue Sep 25, 2017 · 1 comment
Closed

Comments

@tasharofi
Copy link

I am using the "react-native-starter-app" but when I tried it on Androind simulator in the last tab where there are nested "react-native-tab-view", the content of the tabs are not showing and its also not possible to navigate between tabs.

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0-beta.21
  • react-native v0.48.1

Steps to reproduce

  1. run the react-native-starter-app on android
  2. go to the last tab using the bottom tabs
  3. you dont see any content loaded for the top tabs (no content loaded on any of the tabs from tab view).
  4. try to navigate and its not possible

screen shot 2017-09-25 at 4 02 25 pm

@tasharofi tasharofi changed the title tab view not working on Android when nested in a flux tab react-native-tab-view not working on Android when nested in a flux tab Sep 25, 2017
@tasharofi
Copy link
Author

For those who are experiencing the same issue, here is the solution:

<TabViewAnimated lazy style={[styles.tabContainer]} renderScene={this.renderScene} renderHeader={this.renderHeader} navigationState={this.state.navigation} onIndexChange={this.handleChangeTab} renderPager={this._renderPager} />

and

_renderPager = (props) => { return (Platform.OS === 'ios') ? <TabViewPagerScroll {...props} /> : <TabViewPagerPan {...props} /> }

Basically TabViewPagerScroll does not behave fine on Android when it comes to the nested tab views.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant