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

Asked

Viewed 963 times

3

I would like to know first what the name of the component (bar) where are located the buttons "Back", "Home" and "App active" on android. In devices that do not have physical buttons for this function, the components come on the screen and stay on the others (saved 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 matches the colors of my App. To use example can be compared with the Live App where the bottom bar is Purple as well as the top bars.

1 answer

6


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

Add the line to your style

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

Or you can change via Java code

getWindow().setNavigationBarColor(ContextCompat.getColor(this, R.color.sua_cor));

Browser other questions tagged

You are not signed in. Login or sign up in order to post.