Loading packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeHeader.kt +9 −6 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import androidx.compose.animation.core.Animatable import androidx.compose.animation.core.CubicBezierEasing import androidx.compose.animation.core.tween import androidx.compose.foundation.clickable import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column Loading Loading @@ -72,7 +73,6 @@ import com.android.compose.animation.scene.ValueKey import com.android.compose.animation.scene.animateElementFloatAsState import com.android.compose.animation.scene.content.state.TransitionState import com.android.compose.modifiers.thenIf import com.android.compose.theme.colorAttr import com.android.internal.policy.SystemBarUtils import com.android.settingslib.Utils import com.android.systemui.battery.BatteryMeterView Loading Loading @@ -212,6 +212,8 @@ fun ContentScope.CollapsedShadeHeader( } } val textColor = if (isSystemInDarkTheme()) Color.White else Color.Black // This layout assumes it is globally positioned at (0, 0) and is the same size as the screen. CutoutAwareShadeHeader( modifier = modifier.sysuiResTag(ShadeHeader.TestTags.Root), Loading @@ -221,11 +223,11 @@ fun ContentScope.CollapsedShadeHeader( horizontalArrangement = Arrangement.spacedBy(5.dp), modifier = Modifier.padding(horizontal = horizontalPadding), ) { Clock(onClick = viewModel::onClockClicked) Clock(onClick = viewModel::onClockClicked, textColor = textColor) VariableDayDate( longerDateText = viewModel.longerDateText, shorterDateText = viewModel.shorterDateText, textColor = colorAttr(android.R.attr.textColorPrimary), textColor = textColor, modifier = Modifier.element(ShadeHeader.Elements.CollapsedContentStart), ) } Loading Loading @@ -271,7 +273,7 @@ fun ContentScope.CollapsedShadeHeader( showIcon = true, useExpandedFormat = useExpandedTextFormat, modifier = Modifier.padding(vertical = 8.dp), textColor = Color.White, // Single shade is always in Dark theme textColor = textColor, ) } } Loading Loading @@ -311,6 +313,7 @@ fun ContentScope.ExpandedShadeHeader( onClick = viewModel::onClockClicked, modifier = Modifier.align(Alignment.CenterStart), scale = 2.57f, textColor = MaterialTheme.colorScheme.onSurface, ) Box( modifier = Loading @@ -330,7 +333,7 @@ fun ContentScope.ExpandedShadeHeader( VariableDayDate( longerDateText = viewModel.longerDateText, shorterDateText = viewModel.shorterDateText, textColor = colorAttr(android.R.attr.textColorPrimary), textColor = MaterialTheme.colorScheme.onSurface, modifier = Modifier.widthIn(max = 90.dp), ) ShadeHighlightChip { Loading @@ -347,7 +350,7 @@ fun ContentScope.ExpandedShadeHeader( viewModel = viewModel, showIcon = true, useExpandedFormat = useExpandedFormat, textColor = Color.White, // Single shade is always in Dark theme textColor = MaterialTheme.colorScheme.onSurface, ) } } Loading Loading
packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeHeader.kt +9 −6 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import androidx.compose.animation.core.Animatable import androidx.compose.animation.core.CubicBezierEasing import androidx.compose.animation.core.tween import androidx.compose.foundation.clickable import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column Loading Loading @@ -72,7 +73,6 @@ import com.android.compose.animation.scene.ValueKey import com.android.compose.animation.scene.animateElementFloatAsState import com.android.compose.animation.scene.content.state.TransitionState import com.android.compose.modifiers.thenIf import com.android.compose.theme.colorAttr import com.android.internal.policy.SystemBarUtils import com.android.settingslib.Utils import com.android.systemui.battery.BatteryMeterView Loading Loading @@ -212,6 +212,8 @@ fun ContentScope.CollapsedShadeHeader( } } val textColor = if (isSystemInDarkTheme()) Color.White else Color.Black // This layout assumes it is globally positioned at (0, 0) and is the same size as the screen. CutoutAwareShadeHeader( modifier = modifier.sysuiResTag(ShadeHeader.TestTags.Root), Loading @@ -221,11 +223,11 @@ fun ContentScope.CollapsedShadeHeader( horizontalArrangement = Arrangement.spacedBy(5.dp), modifier = Modifier.padding(horizontal = horizontalPadding), ) { Clock(onClick = viewModel::onClockClicked) Clock(onClick = viewModel::onClockClicked, textColor = textColor) VariableDayDate( longerDateText = viewModel.longerDateText, shorterDateText = viewModel.shorterDateText, textColor = colorAttr(android.R.attr.textColorPrimary), textColor = textColor, modifier = Modifier.element(ShadeHeader.Elements.CollapsedContentStart), ) } Loading Loading @@ -271,7 +273,7 @@ fun ContentScope.CollapsedShadeHeader( showIcon = true, useExpandedFormat = useExpandedTextFormat, modifier = Modifier.padding(vertical = 8.dp), textColor = Color.White, // Single shade is always in Dark theme textColor = textColor, ) } } Loading Loading @@ -311,6 +313,7 @@ fun ContentScope.ExpandedShadeHeader( onClick = viewModel::onClockClicked, modifier = Modifier.align(Alignment.CenterStart), scale = 2.57f, textColor = MaterialTheme.colorScheme.onSurface, ) Box( modifier = Loading @@ -330,7 +333,7 @@ fun ContentScope.ExpandedShadeHeader( VariableDayDate( longerDateText = viewModel.longerDateText, shorterDateText = viewModel.shorterDateText, textColor = colorAttr(android.R.attr.textColorPrimary), textColor = MaterialTheme.colorScheme.onSurface, modifier = Modifier.widthIn(max = 90.dp), ) ShadeHighlightChip { Loading @@ -347,7 +350,7 @@ fun ContentScope.ExpandedShadeHeader( viewModel = viewModel, showIcon = true, useExpandedFormat = useExpandedFormat, textColor = Color.White, // Single shade is always in Dark theme textColor = MaterialTheme.colorScheme.onSurface, ) } } Loading