question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[MaterialToolbar] Dynamic color not applied

See original GitHub issue

Description: If a custom color is applied, the dynamic color is not applied to the MaterialToolbar, but is applied to all other components.

Expected behavior: Background color of MaterialToolbar should be brown (chosen system color) like other components.

Minimal sample app repro: MaterialToolbarColorBug.zip

Android API version: 32

Material Library version: 1.7.0-alpha03

Device: Resizable emulator

Explanation of the video:

  1. I showed that brown is selected as the system color
  2. I showed that I enabled dynamic colors in App.kt
  3. I started the app and I showed that FAB, Next button and MaterialToolbar are brown
  4. I enabled the theme definitions in themes.xml and restarted the app (I created the theme in Material Theme Builder)
  5. FAB and Next button are still brown but the MaterialToolbar is blue. That’s the issue

https://user-images.githubusercontent.com/6717356/179428816-866254f2-a825-4081-830f-d98dbb180a71.mp4

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
drchencommented, Jul 18, 2022

The theme builder should be fixed now. : )

1reaction
drchencommented, Jul 18, 2022

That’s a good point. I’ll raise this to the owner of the theme builder.

Read more comments on GitHub >

github_iconTop Results From Across the Web

About Material3 Toolbar DynamicColors - Stack Overflow
Now the background of bottom navigation view was changed into the Dynamic Color automatically But for the toolbar, it doesn't work.
Read more >
[M3/DynamicColors] Dynamic Colors not applied ... - GitHub
SplashScreen and we set postSplashScreenTheme to a theme that inherits from Material3, it does not apply Dynamic Colors when we call ...
Read more >
DynamicColors | Android Developers
Utility for applying dynamic colors to application/activities. ... to be careful about not overriding the colors or you may lose the dynamic color...
Read more >
How to change the color of Action Bar in an Android App?
In this article, you will learn how to change the colour of the Action Bar in an Android App. There are two ways...
Read more >
Dynamic themes in Angular Material | by Erik Tallang - Medium
A working demo of the dynamic themes we create through this article can be found ... Use the Angular Material toolbar in our...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found