REACT Native Hybrid App Notch&#x27的背景彩色更改时
很高兴见到你。 我将通过React Native制作一个混合应用程序,即
iPhone Notch区域的颜色,而Android的状态栏则根据特定页面进行更改颜色(例如,如果WebView页面是登录页面,则是Notch的颜色(状态栏)是蓝色 /对于其他页面)紫色),找到WebView的onnavigationStateChange的URL成功,但我想在随后的过程中寻求帮助
Nice to meet you.
I'm going to make a hybrid app by react native
The color of the iPhone's notch area and Android's StatusBar is designed to change colors depending on a specific page (for example, if the webview page is a login page, the color of the notch (StatusBar) is blue / For other pages) purple), finding the url with onNavigationStateChange of webview was successful, but I want to ask for help on what to do in the subsequent process
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的方法是这样的,您基本上是根据您刚刚导航到的URL将pagename设置为一些字符串,如果该pagename存在于您的颜色对象中,则状态栏颜色将更改为
My approach would be something like this, you basically set pageName to some string based on the url you just navigated to, and if that pageName exists in your colors object then the status bar color will change to it