fadeIn blinks when entering
See original GitHub issueI’m using a tween
AnimationSpec so that I can slow the transition down to highlight the problem, but it also occurs with the other AnimationSpecs. The other EnterTransitions
work fine (slideIn
, etc…).
(The GIF has some artifacting from ffmpeg)
fun main() {
val visible = mutableStateOf(true)
GlobalScope.launch {
while(true) {
delay(2500)
visible.value = false
delay(2500)
visible.value = true
}
}
Window(
title = "Test"
) {
MaterialTheme {
Box(
modifier = Modifier.fillMaxSize()
) {
Test(visible)
}
}
}
}
@ExperimentalAnimationApi
@Composable
fun Test(visible: State<Boolean>) {
AnimatedVisibility(
visible = visible.value,
initiallyVisible = !visible.value,
enter = fadeIn(
animationSpec = tween(durationMillis = 1500)
),
exit = fadeOut(
animationSpec = tween(durationMillis = 1500)
)
) {
Surface(
modifier = Modifier.fillMaxSize()
) {
Text(
"Test",
modifier = Modifier.fillMaxSize(),
textAlign = TextAlign.Center
)
}
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
How to stop fadeIn() blinking? - jquery
Currently I have a simple div that I want to have fade in on mouseover of another div, but it would blink 3...
Read more >Fade in animation seems to be causing a blinking effect at ...
When you first load the page in Chrome, the hero content flashes. It shows then disappears and then fades in. The effect should...
Read more >Weird blinking in jQuery fade effect
I found a tutorial online, but when i change between the pages insted of having a nice fade effect, the page fades and...
Read more >Blink text using jQuery
jQuery Practical Exercises with Solution: Blink text using jQuery. ... $('.blink').fadeIn(500); } setInterval(blink_text, 1000); ...
Read more >How to Make Text Blink in JavaScript?
Make Text Blink in JavaScript · Smooth Blink text using CSS · Blink text using jQuery fadeout() & fadein() function · Blink text...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
https://issuetracker.google.com/issues/181156422
Retested on MacOs. Works fine. Closing.