I set navigation bar color in my app like this:
getWindow().setNavigationBarColor(ContextCompat
.getColor(MainActivity.this, R.color.my_color));
and after change fragment I want to reset navigation bar color(come back to default). How do this ? I want not set in my style android:navigationBarColor">@color/my_navigaton_bar_color< and when I want set default, call:
getWindow().setNavigationBarColor(ContextCompat
.getColor(MainActivity.this, R.color.my_navigaton_bar_color));
P.S. I was try save in variable getWindow().getNavigationBarColor() but it always -1 , a also try decode value from android.R.attrs.navigationBarColor but it also doesn't work