O'Reilly logo

NativeScript for Angular Mobile Development by Nathanael J. Anderson, Nathan Walker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adjusting the status bar background color and text color on iOS and Android

You may have noticed earlier that, on iOS, the status bar text is black and doesn't look very good with our dark skin. Additionally, we may want to alter Android's status bar tint color. NativeScript provides direct access to native APIs, so we can easily change these to whatever we would like. Both platforms deal with them differently, so we can conditionally alter the status bar for each.

Open app/app.component.ts and let's add the following:

// angularimport { Component } from '@angular/core';// nativescriptimport { isIOS } from 'platform';import { topmost } from 'ui/frame';import * as app from 'application';// appimport { AuthService } from './modules/core/services'; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required