反应本地creatematerialtoptabnavigator无法导航到另一个屏幕

时间:2019-10-16 08:06:44

标签: javascript reactjs react-native navigation react-navigation

当我想导航到另一个屏幕时,我仍在选项卡导航器中

当我按主图像时,它应该导航到另一个屏幕 when i press on the main image it should navigate to another screen

她,您仍然可以看到左视图! the left view still there !!

那么如何在选项卡容器之外导航 我尝试将此解决方案与导航服务一起使用,但无法正常工作

https://reactnavigation.org/docs/en/navigating-without-navigation-prop.html

    render() {


    return (

        <Container  >
            <Headerstyle navigation={this.props.navigation} title={this.state.project_name} />
            <View style={{ flexDirection: 'row', backgroundColor: '#1a1a1a', flex: 1, justifyContent: 'center', }}>
                <View style={{ width: wp('30%'), paddingLeft:wp('2%'),paddingTop:hp('2%'), borderRightWidth: 0.5, borderRightColor: 'gray' }}>
                    <Text style={{ color: '#bfb288', width: wp('20%'), fontSize: hp('3%') }}>DETAILS</Text>
                    <View style={{ height: hp('45%') }}>
                        <ScrollView>
                            <Text style={{ color: 'white', width: wp('20%'), fontSize: hp('3%') ,marginTop:hp('2%') }}>{this.props.data.project_description}</Text>
                        </ScrollView>
                    </View>


                    <View style={{width: wp('28%'),alignItems:'center'}}>
                    <View style={{ backgroundColor: '#242426', width: wp('20%'), height: hp('28%'), marginTop: hp('2%'), justifyContent: 'center', alignItems: 'center' }}>
                        <Image

                            source={{ uri: this.props.data.main_image }}
                            style={{
                                width: hp('15%'),
                                height: hp('15%')
                            }}
                            resizeMode={'stretch'}

                        />

                    </View>

                    </View>

                </View>


                <AppContainer />



            </View>
        </Container>


    );
}

0 个答案:

没有答案