Billy Newman
02/24/2023, 9:38 PMTopAppBar(
...
colors = TopAppBarDefaults.smallTopAppBarColors(
containerColor = MaterialTheme.colorScheme.tertiary,
actionIconContentColor = Color.White,
titleContentColor = Color.White,
navigationIconContentColor = Color.White
)
)
However title text and icons are both black.Kirill Grouchnikov
02/24/2023, 9:44 PMtitle
composable child look like? Does it use its own text color?
You can print LocalContentColor.current
inside that child to verify that you’re indeed getting the white color, but the child itself would need to not override the color that is being set at the TopAppBarLayout
levelBilly Newman
02/24/2023, 9:45 PMtitle = {
Text(
text = title,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
style = MaterialTheme.typography.titleLarge
)
},
Zun
02/24/2023, 9:48 PMBilly Newman
02/24/2023, 9:50 PM@Deprecated(
message = "Use TopAppBar instead.",
replaceWith = ReplaceWith(
"TopAppBar(title, modifier, navigationIcon, actions, windowInsets, colors, " +
"scrollBehavior)"
),
level = DeprecationLevel.WARNING
)
@ExperimentalMaterial3Api
@Composable
fun SmallTopAppBar(
Stylianos Gakis
02/24/2023, 9:50 PMKirill Grouchnikov
02/24/2023, 9:50 PMcolor=LocalContentColor.current
in this title
block to verify that your white color is propagating correctlyBilly Newman
02/24/2023, 9:51 PMKirill Grouchnikov
02/24/2023, 9:54 PMTopAppBarColors
that you create at the top, and then trace where titleContentColor
is being pushed down to TopAppBarLayout
Billy Newman
02/24/2023, 10:06 PMLouis Pullen-Freilich [G]
02/24/2023, 10:39 PMKirill Grouchnikov
02/24/2023, 10:39 PMText
is from M2 and not M3Billy Newman
02/24/2023, 11:01 PM