我是React Native的新手,我想在抽屉式导航器中创建子项,但在尝试搜索相同项时却无济于事...如果有解决方案,请让我知道...我在这里共享我的代码:
const AppDrawerNavigator = DrawerNavigator({
ServiceCategories: {
screen: ServiceCategories,
navigationOptions: {
drawerLabel: 'Home',
drawerIcon: () => (
<Icon name="bars" size={18} color="#333" />
)
},
},
Profile: {
screen: AppDrawerNavigator2,
navigationOptions: {
drawerLabel: 'My Profile',
drawerIcon: () => (
// {{ fontWeight:'bold',fontSize:20 }}
<Icon name="user" size={18} color="#333" />
)
},
},
{
contentOptions: {
activeTintColor: '#fff',
inactiveTintColor: '#fff',
activeBackgroundColor: '#ffb6cf',
top:50,
itemStyle: {
fontSize: 18,
},
},
contentComponent: (props) => (
<View>
<ScrollView>
<DrawerUserDetail navigation={props.navigation} />
<DrawerItems
{...props}
getLabel = {(scene) => (
<View style={{borderBottomWidth:0.5,borderBottomColor: "grey",width:width/1.9}}>
<Text style={{color:'#333',fontSize:16,paddingBottom:10,paddingTop:10}}>{props.getLabel(scene)}</Text>
</View>
)}
/>
</ScrollView>
</View>
)
});
关于我们的新闻,我想按要求在此处打开所有静态页面列表,因此,如果有人有想法或代码,请与我们分享。