react-native-scrollable-tab-view
react-native-scrollable-tab-view copied to clipboard
Jump to the ScrollableTabView Page (TabNavigator), Android does not render.
environment
- react-native: 0.51.0
- react-native-scrollable-tab-view: 0.10.0
Steps to Reproduce
Jump to the ScrollableTabView Page (TabNavigator), Android does not render.
Expected Behavior
Android render
Actual Behavior
Android does not have render (MemberCell)
Code
const Tab = TabNavigator(
{
Home: {
screen: language == 'zh' ? ChinseHome : HomeScreen,
navigationOptions: ({ navigation }) => (
{
header: null,
tabBarLabel: ({ focused, tintColor }) => (
<Text style={[styles.tabText, { color: tintColor }]}>{transform('Tab.tab_Name1')}</Text>
),
tabBarIcon: ({ focused, tintColor }) => (
<Image source={require('./img/businessicon.png')} style={{ width: adapt(20), height: adapt(20), tintColor: tintColor }} />
)
}
)
},
FindScreen: {
screen: FindsScreen,
// screen: FindScreen,
navigationOptions: ({ navigation }) => (
{
// header: null,
tabBarLabel: ({ focused, tintColor }) => (
<Text style={[styles.tabText, { color: tintColor }]}>{transform('Tab.tab_Name2')}</Text>
),
tabBarIcon: ({ focused, tintColor }) => (
<Image source={require('./img/findicon.png')} style={{ width: adapt(25), height: adapt(25), tintColor: tintColor }} />
)
}
)
},
}
<Text onPress={() => this.props.navigation.navigate('FindScreen', { page: 'other' }) style={{ fontSize: 12, color: '#fff' }}>发现</Text>
<ScrollableTabView
initialPage={this.props.navigation.state.params ? 2 : 0}
onChangeTab={(obj) => this.setState({ isMemberPage: obj.i == 2 ? true : false })}
renderTabBar={() => <TabBarCell isMemberPage={this.state.isMemberPage} tabNames={tabNames} />}
tabBarBackgroundColor='#fff'
locked={isIOS ? false : true}
tabBarActiveTextColor={color.theme}
tabBarTextStyle={{ fontSize: 13 }}>
<ActivityCell toBusiness={(value) => this._toBusiness(value)} navigation={this.props.navigation} />
<ArticleCell navigation={this.props.navigation} />
<MemberCell isMemberPage={this.state.isMemberPage} navigation={this.props.navigation} />
</ScrollableTabView>
thanks!
the same problem
i got the same problem too, works great on ios tho..
@kingsword09 @falay26 Use this, https://github.com/compojoom/react-native-scrollable-tab-view#fixes_android, but initialPage = 0 in Android.
@showtan001 Your link doesn't open up but i searched the google and find this .. https://github.com/ptomasroos/react-native-scrollable-tab-view/pull/797/commits/ade702c7f35b1899444ff6a450730ae990000a26 if this is what you mean, can you explain how to implament it please.
@falay26 package.json use "react-native-scrollable-tab-view": "git+https://github.com/compojoom/react-native-scrollable-tab-view.git#fixes_android"
@showtan001 use https://github.com/compojoom/react-native-scrollable-tab-view#fixes_android,android can render, but ios performance is not well than before
@kingsword09 Mate sorry but im really a beginner in RN .. when i paste ur code ("react-native-scrollable-tab-view": "git+https://github.com/compojoom/react-native-scrollable-tab-view.git#fixes_android") in my package.json file i get an error in Snack-Expo .. { Version for "react-native-scrollable-tab-view" must be a valid semver version } this one. Can you be more specific for me please?
@showtan001 @kingsword09 OK, i installed git and npm install that forked module.. Still seeing a blank page in android simulator .. Any idea?
same problem in android
same problem, Any idea ?
+0.63 same issue
+0.63.4 same issue