react-native-scrollable-tab-view icon indicating copy to clipboard operation
react-native-scrollable-tab-view copied to clipboard

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

Open showtan001 opened this issue 6 years ago • 12 comments
trafficstars

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!

showtan001 avatar Nov 23 '18 11:11 showtan001

the same problem

kingsword09 avatar Nov 26 '18 03:11 kingsword09

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

falay26 avatar Dec 03 '18 21:12 falay26

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

showtan001 avatar Dec 04 '18 05:12 showtan001

@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 avatar Dec 04 '18 10:12 falay26

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

kingsword09 avatar Dec 05 '18 09:12 kingsword09

@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 avatar Dec 05 '18 10:12 kingsword09

@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 avatar Dec 05 '18 11:12 falay26

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

falay26 avatar Dec 06 '18 09:12 falay26

same problem in android

marlti7 avatar Jun 17 '20 09:06 marlti7

same problem, Any idea ?

algokano avatar Jun 29 '20 06:06 algokano

+0.63 same issue

meiqi1992 avatar Aug 23 '20 14:08 meiqi1992

+0.63.4 same issue

motogod avatar Feb 04 '21 09:02 motogod