Animate navigation bar color change
This commit is contained in:
parent
90c8b7e3ba
commit
324abebb88
|
@ -102,6 +102,7 @@ abstract class BaseActivity : AppCompatActivity(), DIAware {
|
|||
setContent {
|
||||
KeyguardTheme {
|
||||
val containerColor = LocalBackgroundManager.current.colorHighest
|
||||
val containerColorAnimatedState = animateColorAsState(containerColor)
|
||||
val contentColor = contentColorFor(containerColor)
|
||||
Surface(
|
||||
modifier = Modifier.semantics {
|
||||
|
@ -110,7 +111,7 @@ abstract class BaseActivity : AppCompatActivity(), DIAware {
|
|||
// so that it's enabled for the whole subtree
|
||||
testTagsAsResourceId = true
|
||||
},
|
||||
color = containerColor,
|
||||
color = containerColorAnimatedState.value,
|
||||
contentColor = contentColor,
|
||||
) {
|
||||
CompositionLocalProvider(
|
||||
|
|
|
@ -264,6 +264,7 @@ private fun ApplicationScope.KeyguardWindow(
|
|||
) {
|
||||
KeyguardTheme {
|
||||
val containerColor = LocalBackgroundManager.current.colorHighest
|
||||
val containerColorAnimatedState = animateColorAsState(containerColor)
|
||||
val contentColor = contentColorFor(containerColor)
|
||||
Surface(
|
||||
modifier = Modifier.semantics {
|
||||
|
@ -272,7 +273,7 @@ private fun ApplicationScope.KeyguardWindow(
|
|||
// so that it's enabled for the whole subtree
|
||||
// testTagsAsResourceId = true
|
||||
},
|
||||
color = containerColor,
|
||||
color = containerColorAnimatedState.value,
|
||||
contentColor = contentColor,
|
||||
) {
|
||||
val kamelConfig by rememberInstance<KamelConfig>()
|
||||
|
|
Loading…
Reference in New Issue