【问题标题】:How to style the Android status bar on Nativescript?如何在 Nativescript 上设置 Android 状态栏的样式?
【发布时间】:2017-03-07 11:49:01
【问题描述】:

我遇到的问题(并且我无法找到解决方案)是如何在NativeScript 中设置状态栏的样式。我尝试使用this

但是当我把

<x:StatusBar android:barStyle="#0E0A0E"/>

main-page.xml 文件中的任何位置(我猜正确的位置在&lt;Page xmlns="http://schemas.nativescript.org/tns.xsd" xmlns:x="nativescript-statusbar"&gt; 行下方,但试图找出是否是问题所在)状态栏变黑,整个应用程序变为空白页面...显然不是我要找的。目前我只有一个新的NativeScript 项目(无模板)。

【问题讨论】:

    标签: javascript android css xml nativescript


    【解决方案1】:

    我没有尝试过您链接的插件,因此无法对此发表评论,但我正在使用此文件:https://github.com/NativeScript/sample-Groceries/blob/cddf211204dfd21efde2559bb84674f94fcd6d9a/app/shared/status-bar-util.ts

    您在 main 中引用它,该 repo 中也显示了它。

    【讨论】:

    猜你喜欢
    • 2020-01-09
    • 1970-01-01
    • 1970-01-01
    • 2016-12-09
    • 1970-01-01
    • 1970-01-01
    • 2021-02-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多