Top app bar title content colour on some devices
Build / Build and release (push) Canceled after 0s
version-code-change / Update version.properties (push) Canceled after 0s

This commit is contained in:
Prem Nirmal
2026-03-19 21:13:54 +00:00
parent a55083414d
commit 8d75203878
@@ -220,7 +220,8 @@ private fun TopAppBar(
scrollState: CollapsingTopBarScrollConnection,
onTotalHoldingsClick: () -> Unit,
) {
val backgroundColor = TopAppBarDefaults.topAppBarColors().containerColor
val topAppBarColors = TopAppBarDefaults.topAppBarColors()
val backgroundColor = topAppBarColors.containerColor
val offset = abs(scrollState.appBarOffset / TopAppBarDefaults.TopAppBarExpandedHeight.value)
val tobAppBarBackgroundColor = animateColorAsState(
when (offset) {
@@ -240,7 +241,7 @@ private fun TopAppBar(
text = stringResource(R.string.app_name),
colors = TopAppBarDefaults.topAppBarColors(
containerColor = tobAppBarBackgroundColor.value,
titleContentColor = MaterialTheme.colorScheme.onPrimaryContainer
titleContentColor = topAppBarColors.titleContentColor,
),
actions = {
if (viewModel.hasHoldings) {