[英]How can I set the background color in react-navigation 5
I am using react-navigation @5.0.0 and I have added a background color to my root <View />
.我正在使用react-navigation @5.0.0 并为我的根
<View />
添加了背景颜色。
It seems that another view created by react-navigation is having some background color set, because I can't see my background.似乎由 react-navigation 创建的另一个视图设置了一些背景颜色,因为我看不到我的背景。 (Just as an example, I Can see the dark background when I use react-router)
(举个例子,当我使用 react-router 时,我可以看到深色背景)
How can I set the background color of a page using react-navigation v5如何使用 react-navigation v5 设置页面的背景颜色
I know it's late, but I'll leave it to you just in case.我知道已经晚了,但我会把它留给你以防万一。
It is a matter of Expo from what I have managed to investigate.从我设法调查的情况来看,这是世博会的问题。 Expo does not have support for changing (as far as I have found information) the root view color for Android and iOS from Expo without Ejecting your project.
Expo 不支持从 Expo 更改(据我所知)Android 和 iOS 的根视图颜色而不弹出您的项目。 Apparently to be able to modify that, it is required to use the command
eject
and alter said behavior in Android and iOS projects on ther respective languages and supported features.显然,为了能够修改它,需要在各自的语言和支持的功能上使用命令
eject
并改变 Android 和 iOS 项目中的所述行为。 There is a workaround with Expo but personally it is not practical at all Expo 有一种解决方法,但就个人而言,它根本不实用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.