如何在 Android 上使用 NativeScript 和 Angular 更改 StatusBar 颜色或将其设置为透明? [英] How can i change the StatusBar color or set it to transparent on Android, using NativeScript with Angular?

查看:104
本文介绍了如何在 Android 上使用 NativeScript 和 Angular 更改 StatusBar 颜色或将其设置为透明?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Angular 中使用 NativeScript,我似乎无法更改项目中的 StatusBar 颜色或将其设置为透明(这些都可以).相反,它不是完全透明的,而是半透明的黑色,所以背景在它后面滚动,但它被状态栏变暗.我想将其设置为透明或更改颜色(与页面背景相同)

I'm using NativeScript with Angular, and I can't seem to change the StatusBar color in my project or set it to transparent (any of these would be fine). Instead, it is not totally transparent, but is translucent black, so the background scrolls behind it but it is darkened by the StatusBar. I would like to set it to transparent or to change the color (to the same one as the page background)

我尝试过的:

  • 更改 App_Resources/Android/src/main/res/values/colors.xml 中的ns_primaryDark"和ns_primary"颜色(如果我将 TranslucentStatus" 设置为 false,则在启动屏幕上工作;