ptomasroos / react-native-scrollable-tab-view

Tabbed navigation that you can swipe between, each tab can have its own ScrollView and maintain its own scroll position between swipes. Pleasantly animated. Customizable tab bar
https://www.npmjs.com/package/react-native-scrollable-tab-view
6.94k stars 2.28k forks source link

使用视图包裹后无法切换tab #1028

Open zelin-zx opened 5 years ago

zelin-zx commented 5 years ago

<View style={{ width: 400 }}> <ScrollableTabView style={styles.container} renderTabBar={() => } tabBarUnderlineStyle={styles.lineStyle} tabBarActiveTextColor='#FF0000'>

                <Text style={styles.textStyle} tabLabel='娱乐'>娱乐</Text>
                <Text style={styles.textStyle} tabLabel='科技'>科技</Text>
                <Text style={styles.textStyle} tabLabel='军事'>军事</Text>
                <Text style={styles.textStyle} tabLabel='体育'>体育</Text>
            </ScrollableTabView>
        </View>
wqxwqx commented 5 years ago

尝试flex:1