美文网首页
react-navigation stacknavigation

react-navigation stacknavigation

作者: 向前Hell | 来源:发表于2017-07-19 15:29 被阅读0次
 Home:{
        screen:Home,
        navigationOptions:{
            headerTitle:(
                <TouchableOpacity
                    style={{width:width-80,alignItems:'center'}}
                >
                    <Text>123</Text>
                </TouchableOpacity>
            ),
            headerRight:(
                <TouchableOpacity
                    style={{justifyContent:'center',
                            width:80,
                            height:50,
                            alignItems:'center'}}
                    onPress={()=>this.props.navigation.navigate('Msg')}
                >
                    <Image
                        style={{
                            height:20,
                            width:25,
                        }}
                        source={require('./icons/msg-icon.png')}
                    />
                </TouchableOpacity>
            ),
            headerLeft:(
                <TouchableOpacity
                    style={{justifyContent:'center',
                            width:80,
                            height:50,
                            alignItems:'center'}}
                    onPress={()=>this.props.navigation.navigate('Find')}>
                    <Image
                        style={{
                            height:25,
                            width:25,
                        }}
                        source={require('./icons/find-icon.png')}
                    />
            </TouchableOpacity>
            ),
            headerBackTitle:null,
            headerStyle:{
                elevation: 0,
                height:50,
            },
        },
    },

相关文章

网友评论

      本文标题:react-navigation stacknavigation

      本文链接:https://www.haomeiwen.com/subject/gjvlkxtx.html