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