Created
May 18, 2017 16:29
-
-
Save greg-nagy/857f1100f11f079e4d9de59fbdc23151 to your computer and use it in GitHub Desktop.
Android status bar is still light
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Component} from "@angular/core"; | |
import {isIOS} from "tns-core-modules/platform"; | |
import {topmost} from "tns-core-modules/ui/frame"; | |
import * as app from 'application'; | |
declare var android; | |
@Component({ | |
selector: "ns-app", | |
templateUrl: "app.component.html", | |
}) | |
export class AppComponent { | |
constructor() { | |
if (isIOS) { | |
topmost().ios.controller.navigationBar.barStyle = 1; | |
} else { | |
let decorView = app.android.startActivity.getWindow().getDecorView(); | |
decorView.setSystemUiVisibility(android.view.View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment