adjustMarginsForEdgeToEdge: 'force' and colors of status and navigation bar

Hello there!

I have used the new adjustMarginsForEdgeToEdge: ‘force’ in the capacitor.config.ts and it works fine as for the edge-to-edge display. But how can I control the color of status and navigation bar?
The backgroundColor option does not work, as they are outside of capacitor web view.
Status Bar plugin seems to do nothing too.

1 Like

Android Edge-to-Edge Support Plugin for Capacitor provides setBackgroundColor method:

It would be great if Ionic supported this without a plugin.

Ideally we wouldn’t even have to do anything: ion-header component could detect edge-to-edge mode on Android and add top padding accordingly.

It actually already adds padding using --ion-safe-area-top (env(safe-area-inset-top)) but it is zero on devices without notches (e.g. Samsung Galaxy Tab A).