3

Expo allows changing the color and other aspects of the StatusBar (at the top of the screen.)

I don't see any mention of modifying the NavBar (bottom of the screen) background color to match anywhere though. Is this possible without detaching?:

Slbox
  • 10,957
  • 15
  • 54
  • 106
  • 1
    I don’t think there is the API to do it in Expo though it can be done in [native android](https://stackoverflow.com/questions/27839105/android-lollipop-change-navigation-bar-color) but it seems lot to eject just to make that change. – Andrew Feb 26 '19 at 20:55

1 Answers1

4

In app.json, you can add the following (to the expo node)

    "androidNavigationBar": {
      "backgroundColor": "#880000"
    },

More detail can be found in the expo docs on app.json.

As of SDK 38, this won't work in bare workflow / ejected mode as far as I can tell.

Max Weber
  • 95
  • 5
  • Can you add a link to the relevant docs to your answer? – Slbox Jul 22 '20 at 23:18
  • @Slbox added a link to the expo docs for further reading :) – Max Weber Jul 22 '20 at 23:28
  • Awesome! Any idea if it can be controlled programmatically like the StatusBar? It seems like not yet. – Slbox Jul 23 '20 at 00:03
  • 1
    @Slbox A bit late, but it can be controlled with `NavigationBar.setBackgroundColorAsync()` (docs at https://docs.expo.dev/versions/latest/sdk/navigation-bar/#navigationbarsetbackgroundcolorasynccolor) – Lucas Basquerotto Apr 20 '23 at 18:46