How to change toolbar text color from MaterialComponents.DayNight theme?

后端 未结 5 1831
萌比男神i
萌比男神i 2021-02-20 17:58

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\'

5条回答
  •  独厮守ぢ
    2021-02-20 18:09

    I used these two lines of code inside the styles.xml file:

    @android:color/white
    @android:color/white
    

    It changed the color on the toolbar text and the toolbar X icon to white.

    The whole code looked like this:

    
        
        
    
    

提交回复
热议问题