'How to style the Android status bar on Nativescript?

The problem I'm having (and for which I haven't been able to find a solution) is how to style the status bar in NativeScript. I tried to use this

but when I put the

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

line wherever in the main-page.xml file (I guess the correct place is below the <Page xmlns="http://schemas.nativescript.org/tns.xsd" xmlns:x="nativescript-statusbar"> line, but tried to find out if that was the problem) the status bar turns black and the entire app change to a blank page... Obviously not what I'm looking for. At this moment all I have is a new NativeScript project (no template).



Solution 1:[1]

I haven't tried the plugin you linked to, so can't comment on that, but I'm using this file: https://github.com/NativeScript/sample-Groceries/blob/cddf211204dfd21efde2559bb84674f94fcd6d9a/app/shared/status-bar-util.ts

You reference it in main, which is also shown in that repo.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Eddy Verbruggen