weixin_39864261
weixin_39864261
2021-01-06 03:47

android 超出部分怎么不隐藏

qq 20171103165035

在ios上 tab超出部分被显示了出来,android上就隐藏了,请问怎么办?

RN 0.48.2 ` { tabBarItems.map((tabBarItem, i) => { let ViewController = tabBarItem.viewController;

                    return (
                        <TabNavigator.Item
                            key={i}
                            selected={this.state.selectedTab === tabBarItem.title}
                            title ={tabBarItem.title}
                            tabStyle={{overflow:'visible'}}
                            titleStyle={{overflow:'visible'}}
                            selectedTitleStyle={{overflow:'visible'}}
                            renderIcon={()=> {
                                return(
                                    <Image resizeMode={'contain'} style={[styles.img,i==2?styles.positionImg:{}]} source={tabBarItem.renderIcon}/>
                                );
                            }}
                            renderSelectedIcon={()=> {
                                return(
                                    <Image resizeMode={'contain'} style={[styles.img,i==2?styles.positionImg:{},{overflow:'visible'}]} source={tabBarItem.renderSelectedIcon}/>
                                );
                            }}
                            selectedTitleStyle={{color:'#ff641b',backgroundColor:'rgba(0,0,0,0)'}}
                            titleStyle={{backgroundColor:'rgba(0,0,0,0)'}}
                            onPress={()=> {
                                this.setState({
                                    selectedTab:tabBarItem.title
                                })
                            }}
                        >
                            <ViewController {...this.props}/>

                        </TabNavigator.Item>
                    )

                })
            }
        </TabNavigator>

`

该提问来源于开源项目:ptomasroos/react-native-tab-navigator

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

14条回答

为你推荐