File tree 1 file changed +10
-6
lines changed 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -243,15 +243,19 @@ export class PageStyler implements style.Styler {
243
243
244
244
// android-status-bar-background-property
245
245
private static setAndroidStatusBarBackgroundProperty ( v : view . View , newValue : any ) {
246
- let window = app . android . startActivity . getWindow ( ) ;
247
- let nativeColor = new colorModule . Color ( newValue ) . android ;
248
- window . setStatusBarColor ( nativeColor ) ;
246
+ if ( platform . device . sdkVersion >= "21" ) {
247
+ let window = app . android . startActivity . getWindow ( ) ;
248
+ let nativeColor = new colorModule . Color ( newValue ) . android ;
249
+ window . setStatusBarColor ( nativeColor ) ;
250
+ }
249
251
}
250
252
251
253
private static resetAndroidStatusBarBackgroundProperty ( v : view . View , nativeValue : any ) {
252
- let window = app . android . startActivity . getWindow ( ) ;
253
- let nativeColor = ( nativeValue instanceof colorModule . Color ) ? ( < colorModule . Color > nativeValue ) . android : new colorModule . Color ( nativeValue ) . android ;
254
- window . setStatusBarColor ( nativeColor ) ;
254
+ if ( platform . device . sdkVersion >= "21" ) {
255
+ let window = app . android . startActivity . getWindow ( ) ;
256
+ let nativeColor = ( nativeValue instanceof colorModule . Color ) ? ( < colorModule . Color > nativeValue ) . android : new colorModule . Color ( nativeValue ) . android ;
257
+ window . setStatusBarColor ( nativeColor ) ;
258
+ }
255
259
}
256
260
257
261
private static getAndroidStatusBarBackgroundProperty ( v : view . View ) : any {
You can’t perform that action at this time.
0 commit comments