安卓modal问题

reactnative
老版本安卓modal显示倒是没有问题
在0.56.7版本 modal 使用时 安卓的电池条会显示白色
而且会多出一个 StatusBar

项目里可以使用 <StatusBar hidden={true}/>设置隐藏
如:

<Modal
                style={{margin: 0}}
                deviceWidth={width}
                deviceHeight={height}
                transparent={true}
                visible={this.state.visible}
                animationType={animation ? animation : 'slide'}
                onRequestClose={() => this.close()}
            >
                <TouchableOpacity style={{flex: 1}} activeOpacity={1} onPress={this.close}//点击灰色区域消失
                >
                    <StatusBar hidden={true}/>
                    <View style={[styles.container, baseStyle]}>
                        {this.renderContent()}
                    </View>
                </TouchableOpacity>
            </Modal>

但白色还是不能很好解决

使用组件 react-native-modal 也不是很完美
有时好使有时失效

猜你喜欢

转载自blog.csdn.net/weixin_33836223/article/details/87619554