Change phone bottom touches color with react native

Viewed 103

How do I change the color of the bottom touches of the phone in react native. Link to an image. enter image description here

1 Answers

Navigate to that directory:

your_project/android/app/src/main/res/values.

There will be styles.xml file, open it and there will be something like that:

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <!-- Customize your theme here. -->
    <item name="android:textColor">#000</item>
    <item name="android:navigationBarColor">#000</item> // Add this line and change the color
</style>

Then go to your_project/android/build.gradle and change minSdkVersion to 21 or higher.

buildscript {
    ext {
        buildToolsVersion = "29.0.2"
        minSdkVersion = 21 // or higher
        compileSdkVersion = 29
        targetSdkVersion = 29
    }
}

If you are using Expo, try to add this to app.json file:

{
  "androidNavigationBar": {
    "visible": true,

    "barStyle": "light-content" or "dark-content",

    "backgroundColor": color_here
  }
}
Related