Hey everyone, I have been experimenting trying to ...
# compose
a
Hey everyone, I have been experimenting trying to write a custom theme composable quite similar to how Jetcaster Sample App is implementing it. In order to help debug areas that I might have missed applying my custom theme color, I've made all of my Material colors to a bright yellow. Now the problem I've seeing is that when I have a simple NavHost that hosts multiple screens and I move between the screen, the bright yellow color I've set flashes for a second before my custom theme colors take over (as you may be able to see in the video). Is this a bug or is this how it was intended to be ?
1
I am aware that I can solve this problem by setting the Material colors to transparent but I want to understand what's actually causing this issue
1
t
Is there some
Surface
or something that is sitting at the root that doesn’t use your custom theme? Thinking that the
NavHost
container is getting the default color. Does it change anything if you add `Modifier`s on
NavHost
?
a
Not that I can think of but thats something I can check
Figured it out! It was the Scaffold Component I was using. Apparently the Scaffold has a default background color that uses Material primary which was yellow before it was covered by the top bar and the bottom bar and the content
👍🏼 1