I am using MaterialComponents.DayNight theme in my app. In the day mode, toolbar text color is black. But when I switch to night mode toolbar text color is remain black, so it\'
Just use in your Layout (it works also with the androidx.appcompat.widget.Toolbar
) the style:
Then define in the values-night/colors.xml
the colorOnPrimary
.
Then there are a lot of alternatives.
You can customize globally the style of the toolbar in the app theme with:
with:
and the define the color in the values/colors.xml
and values-night/colors.xml
.
Or just apply a style in the Toolbar
or simply override the theme with:
with: