【发布时间】:2021-01-21 09:23:11
【问题描述】:
还有其他可用的解决方案,但它们与我的问题无关。 我在组件之外没有文本
import { MaterialDialog } from 'react-native-material-dialog';
import React, {Component} from 'react';
import {View,Text,StyleSheet } from 'react-native';
export default class Test extends Component {
constructor(props){
super(props);[enter image description here][1]
this.state = {
visible: true,
}
}
render() {
return (
<View>
<MaterialDialog
title={"Use Google's Location Service?"}
visible={this.state.visible}
onOk={() => this.setState({ visible: false })}
onCancel={() => this.setState({ visible: false })}>
<Text>
Let Google help apps determine location. This means sending anonymous
location data to Google, even when no apps are running.
</Text>
</MaterialDialog>;
</View>
)
}
}
任何帮助表示赞赏!感谢这个美好的社区。p>
【问题讨论】:
标签: android react-native