1

I've started to replace styles with the new Material3 ones (Material You) which are present in the latest Material Design Components library. However, I don't see a replacement for Widget.MaterialComponents.Toolbar.PrimarySurface (a style that handles dark mode better by not using the primary color, which looks to bright). There's Widget.Material3.Toolbar, Widget.Material3.Toolbar.Surface and Widget.Material3.Toolbar.OnSurface but I don't think any of them is a replacement.

Am I missing something here?

1 Answer 1

1

Widget.MaterialComponents.Toolbar.PrimarySurface style is just a combination of Widget.MaterialComponents.Toolbar.Primary and Widget.MaterialComponents.Toolbar.Surface styles for light and dark mode.

That means this style uses colorPrimary in light mode and colorSurface in dark mode.

In the Material 3 (Material you) , the default background color for the toolbar is changed from colorPrimary to colorSurface.

You can always customize these material 3 themes according to your preference.

2
  • Yes, after my question I noted that the idea now is not to use the primary color as the background in top bars. Thanks!
    – niqueco
    Commented Mar 21, 2022 at 14:39
  • @DrHowdyDoo Can you please answer my question ? stackoverflow.com/questions/76144823/…
    – CODAR747
    Commented May 2, 2023 at 3:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.