How do I change the color of the bottom bar, where the "Back", "Home" and "Active" buttons are located?

3

I'd like to know first the name of the component (bar) where the "Back", "Home" and "Active" buttons on the android are located. On devices that do not have physical buttons for this function, the components come on the screen and stay on top of the others (except in cases of app running in fullscreen).

I would also like to know how to change the background color of this bar so that it conforms to the colors of my App. To use example you can compare it with the Vivo App where the bottom bar is Purple so like the top bars.

    
asked by anonymous 10.10.2016 / 20:21

1 answer

6

This part is called navigationBarColor and to change it, do the following:

Add your line to your style

<item name="android:navigationBarColor">@color/sua_cor</item>

Or you can change via the same Java code

getWindow().setNavigationBarColor(ContextCompat.getColor(this, R.color.sua_cor));
    
10.10.2016 / 20:25