2
A
回答
1
你可以设置的backgroundColor: 'RGBA(0,0,0,0.2)'。
<Modal
animationType={"slide"}
transparent={false}
visible={this.state.modalVisible}
onRequestClose={() => {alert("Modal has been closed.")}}
>
<View style={{flex: 1,backgroundColor: 'rgba(0,0,0,0.2)'}}>
<View style ={{flex:1, alignItems: 'center', justifyContent: 'center'}}>
<View style={{backgroundColor: '#ffffff', width: 300, height: 300}}>
<Text>Hello World!</Text>
</View>
<TouchableHighlight
style={{backgroundColor: '#ffffff', width: 300, height: 40, marginTop: 40}}
onPress={() => {this.setModalVisible(!this.state.modalVisible)}}
>
<Text>Hide Modal</Text>
</TouchableHighlight>
</View>
</View>
</Modal>
+0
我认为这种类型的菜单是iOS中的本地组件,因为我在很多应用程序中看到它。我错了吗? – Tony
相关问题
- 1. 反应本机隐藏底部导航
- 2. 反应本机抽屉菜单:无法找到变量样式
- 3. 将菜单文本对齐到底部
- 4. 底部文本对齐或菜单
- 5. 如何在底部禁用反应本机警告消息
- 6. 反应本机WebView渲染底部的意外边框
- 7. 反应本机ScrollView没有滚动到底部有时
- 8. 如何在全屏模式下将菜单添加到底部?
- 9. 底部菜单与ActionBarSherlock
- 10. 显示底部菜单
- 11. 将顶部菜单栏移到底部
- 12. 如何设计反应本机侧面菜单?
- 13. 阵营本地操作栏和反应机菜单
- 14. 创建反应本机应用程序 - 使用本机模块
- 15. 反应本机渲染只有部分
- 16. 自定义Android底部菜单栏
- 17. 更改底部菜单项的背景
- 18. 下拉菜单超过页面底部
- 19. Android底部导航菜单4项
- 20. 下拉菜单底部空间
- 21. BottomAppBar覆盖汉堡菜单底部
- 22. Android创建底部酒吧菜单
- 23. 底部导航菜单图标项
- 24. Android:翻译底部的菜单
- 25. Android底部条形菜单onclick动作
- 26. 禁用底部菜单动画
- 27. KeyboardType - 反应本机
- 28. 反应本机onesignal
- 29. 在反应本机
- 30. 反应汉堡菜单onclick
你可以尝试https://github.com/beefe/react-native-actionsheet – Jayasagar
我发现了一个更好的跨平台解决方案:https://github.com/beefe/react-native-actionsheet – Tony