Loading packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeHeader.kt +15 −3 Original line number Original line Diff line number Diff line Loading @@ -18,6 +18,8 @@ package com.android.systemui.shade.ui.composable package com.android.systemui.shade.ui.composable import android.view.ContextThemeWrapper import android.view.ContextThemeWrapper import android.view.Gravity import android.view.View import android.view.ViewGroup import android.view.ViewGroup import androidx.annotation.ColorInt import androidx.annotation.ColorInt import androidx.compose.animation.core.Animatable import androidx.compose.animation.core.Animatable Loading @@ -38,6 +40,7 @@ import androidx.compose.foundation.layout.offset import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.widthIn import androidx.compose.foundation.layout.widthIn import androidx.compose.foundation.layout.wrapContentWidth import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.LaunchedEffect Loading Loading @@ -522,13 +525,22 @@ private fun ContentScope.Clock( AndroidView( AndroidView( factory = { context -> factory = { context -> Clock( Clock( ContextThemeWrapper(context, R.style.Theme_SystemUI_QuickSettings_Header), ContextThemeWrapper( context, R.style.Theme_SystemUI_QuickSettings_Header, ), null, null, ) ) .apply { isSingleLine = true textDirection = View.TEXT_DIRECTION_LOCALE gravity = Gravity.START or Gravity.CENTER_VERTICAL } }, }, update = { view -> textColor?.let { view.setTextColor(it.toArgb()) } }, update = { view -> textColor?.let { view.setTextColor(it.toArgb()) } }, modifier = modifier = modifier modifier .wrapContentWidth(unbounded = true) // use graphicsLayer instead of Modifier.scale to anchor transform to the // use graphicsLayer instead of Modifier.scale to anchor transform to the // (start, top) corner // (start, top) corner .graphicsLayer { .graphicsLayer { Loading Loading
packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeHeader.kt +15 −3 Original line number Original line Diff line number Diff line Loading @@ -18,6 +18,8 @@ package com.android.systemui.shade.ui.composable package com.android.systemui.shade.ui.composable import android.view.ContextThemeWrapper import android.view.ContextThemeWrapper import android.view.Gravity import android.view.View import android.view.ViewGroup import android.view.ViewGroup import androidx.annotation.ColorInt import androidx.annotation.ColorInt import androidx.compose.animation.core.Animatable import androidx.compose.animation.core.Animatable Loading @@ -38,6 +40,7 @@ import androidx.compose.foundation.layout.offset import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.widthIn import androidx.compose.foundation.layout.widthIn import androidx.compose.foundation.layout.wrapContentWidth import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.LaunchedEffect Loading Loading @@ -522,13 +525,22 @@ private fun ContentScope.Clock( AndroidView( AndroidView( factory = { context -> factory = { context -> Clock( Clock( ContextThemeWrapper(context, R.style.Theme_SystemUI_QuickSettings_Header), ContextThemeWrapper( context, R.style.Theme_SystemUI_QuickSettings_Header, ), null, null, ) ) .apply { isSingleLine = true textDirection = View.TEXT_DIRECTION_LOCALE gravity = Gravity.START or Gravity.CENTER_VERTICAL } }, }, update = { view -> textColor?.let { view.setTextColor(it.toArgb()) } }, update = { view -> textColor?.let { view.setTextColor(it.toArgb()) } }, modifier = modifier = modifier modifier .wrapContentWidth(unbounded = true) // use graphicsLayer instead of Modifier.scale to anchor transform to the // use graphicsLayer instead of Modifier.scale to anchor transform to the // (start, top) corner // (start, top) corner .graphicsLayer { .graphicsLayer { Loading