如何使用react-navigation和react native制作图片中的标签栏? 如图,如何圈出标签页菜单?我应该使用react-native-svg路径吗?
我尝试了以下代码:
export default class TabNavigatorComponent extends Component {
constructor(props) {
super(props);
}
render() {
return (
<View style={styles.wrapper}>
<View style={styles.container}>
<View style={styles.tabContainer}>
<Text>Tab1</Text>
</View>
<View style={styles.tabContainer}>
<Text>Tab2</Text>
</View>
<View style={styles.tabContainer}>
<Text>Tab3</Text>
</View>
</View>
</View>
)
}
}
我的风格代码:
const styles=StyleSheet.create({
wrapper:{
flex:1,
display: 'flex',
justifyContent:'flex-end',
alignItems:'center',
backgroundColor:colors.white,
},
container:{
flexDirection:'row',
justifyContent: 'center',
alignItems: 'flex-start',
backgroundColor: colors.green01,
height:50,
width:screenInfo.width,
},
tabContainer:{
height:80,
width:80,
borderRadius:70,
borderColor:colors.white,
borderWidth: 1,
marginBottom: 20,
backgroundColor: colors.green01,
},
});