I have a Scaffold TopBar element, and containerCol...
# compose
k
I have a Scaffold TopBar element, and containerColor is primary color. When I set my action to be TextButton, that button has same primary color as TopBar container. How do I approach this so my TextButton has actually different traits (text and ripple effect to be onPrimary color)?
p
Try to play with this code:
Copy code
MaterialTheme(colors = Colors(onSurface=MaterialTheme.colors.onPrimary)) {
  //content inside you bar 
}
k
That's a nice trick. I wonder if my problem is a bug, because, when I set TopBar content color to be white, button color is not being overwritten.