9

I need to change the Status bar text color to dark (or black).But it is not supported on Cordova plugin.But I have seen where there is a method on Android native device as shown below.Can we do the same on Ionic 3 app too?

Refernce:

<style name="statusBarStyle" parent="@android:style/Theme.DeviceDefault.Light">
    <item name="android:statusBarColor">@color/status_bar_color</item>
    <item name="android:windowLightStatusBar">false</item>
</style>
Sampath
  • 63,341
  • 64
  • 307
  • 441
  • Have you tried this plugin ? https://ionicframework.com/docs/native/status-bar/ Then you check which platform you are in app.component.ts and you set the style you need ? – carton Mar 23 '18 at 16:17

2 Answers2

0

You can try this

statusBar.overlaysWebView(true);
statusBar.backgroundColorByHexString('#1f2933');
Nifal Nizar
  • 895
  • 1
  • 8
  • 17
0

You could try binding the color of your DOM element to a variable and change that.

OR

You could make two different DOM elements, one of each color and decide which one is shown by using *ngIf

Skrettinga
  • 119
  • 8