I am working with Nativescript 8.5 and want to change the color of the StatusBar. I found already a 4 year old Stackoverflow entry which describes 3 solutions:
androidStatusBarBackground
style to Page
elementstyles.xml
(android:statusBarColor, android:windowLightStatusBar, android:windowActionBarOverlay, android:windowTranslucentStatus)Application.android.startActivity.getWindow().setStatusBarColor(0);
)But non of them changed anything. Any tips?
The Problem was, that there two styles.xml in nativescript projects:
app/main/res/values/styles.xml
app/main/res/values-v21/styles.xml
I looked only in the first one, while the seconds one overwrote my android:windowTranslucentStatus
. After removing android:windowTranslucentStatus
form the second one all methods for settings the color of the statusBar worked.