File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 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 {
243243
244244 // android-status-bar-background-property
245245 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+ }
249251 }
250252
251253 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+ }
255259 }
256260
257261 private static getAndroidStatusBarBackgroundProperty ( v : view . View ) : any {
You can’t perform that action at this time.
0 commit comments