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

Jump to the ScrollableTabView Page (TabNavigator), Android does not render. #960

Open
showtan001 opened this issue Nov 23, 2018 · 12 comments

Comments

@showtan001
Copy link

showtan001 commented Nov 23, 2018

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!

@kingsword09
Copy link

the same problem

@falay26
Copy link

falay26 commented Dec 3, 2018

i got the same problem too, works great on ios tho..

@showtan001
Copy link
Author

showtan001 commented Dec 4, 2018

@kingsword09 @falay26 Use this, https://github.com/compojoom/react-native-scrollable-tab-view#fixes_android, but initialPage = 0 in Android.

@falay26
Copy link

falay26 commented Dec 4, 2018

@showtan001 Your link doesn't open up but i searched the google and find this .. ade702c if this is what you mean, can you explain how to implament it please.

@kingsword09
Copy link

@falay26 package.json use
"react-native-scrollable-tab-view": "git+https://github.com/compojoom/react-native-scrollable-tab-view.git#fixes_android"

@kingsword09
Copy link

@showtan001 use https://github.com/compojoom/react-native-scrollable-tab-view#fixes_android,android can render, but ios performance is not well than before

@falay26
Copy link

falay26 commented Dec 5, 2018

@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?

@falay26
Copy link

falay26 commented Dec 6, 2018

@showtan001 @kingsword09 OK, i installed git and npm install that forked module.. Still seeing a blank page in android simulator .. Any idea?

@fingera fingera mentioned this issue Dec 26, 2018
@marlti7
Copy link

marlti7 commented Jun 17, 2020

same problem in android

@algokano
Copy link

same problem, Any idea ?

@meiqi1992
Copy link

+0.63 same issue

@motogod
Copy link

motogod commented Feb 4, 2021

+0.63.4 same issue

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

7 participants