Here are some ways to change Navigation Bar color.
By the XML
1- values-v21/style.xml
<item name="android:navigationBarColor">@color/navigationbar_color</item>
Or if you want to do it only using the values/ folder then-
2- values/style.xml
<resources xmlns:tools="http://schemas.android.com/tools">
<item name="android:navigationBarColor" tools:targetApi="21">@color/navigationbar_color</item>
You can also change navigation bar color By Programming.
if (Build.VERSION.SDK_INT >= 21)
getWindow().setNavigationBarColor(getResources().getColor(R.color.navigationbar_color));
By Using Compat Library-
if (Build.VERSION.SDK_INT >= 21) {
getWindow().setNavigationBarColor(ContextCompat.getColor(this, R.color.primary));
}
please find the link for more details- http://developer.android.com/reference/android/view/Window.html#setNavigationBarColor(int)