change statusBar background color and icon color for only one screen(Page) for iOS and android
Closed this issue · 1 comments
Feature Request
Requesting for a method to change background color and text/icon color change of status bar only for one page. This page should also be available for both iOS and Android.
Motivation Behind Feature
Recently, with iPhone14 pro max dynamic island introduction, many apps were having issue with statusBar. In our application, we were having black statusBar and because of that dynamic Island merges with statusBar. This does not give good user experience.
In many cases, App's launch page or login Page have different background color than rest of the app. For example, in our app we have gray background on login Page(its a fullPage with only two input fields and a submit button) and once logged in The top Menu/Nav is with white background. Here, I want to change the statusBar color for Gray for loginPage and white for rest of the app.
It is a good to have feature as with constant change in UI and device interface, one can have more control over their application.
Feature Description
currently we can change backgroundColor for statusBar form config.xml and that applies to entire application.
changing statusBar from black to white :
``
Alternatives or Workarounds
cordova knows nothing about the app it's loading nor the pages it contains, so it's not possible to program the plugin to change the status bar based on your app pages.
But you can use the javascript API to change the status bar color/style whenever you want, so when you load the page where you want to apply a different style, just use StatusBar.styleDefault();
(or any other of the styles), and when going back to the previous screen call it again with a different style.