-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🔧 We have made modifications so that the language switching switch can be pressed even on small devices with low resolution. #956
Conversation
if ( | ||
sharedTransitionScope != null && | ||
animatedScope != null | ||
) { | ||
LaunchedEffect(sharedTransitionScope, animatedScope) { | ||
snapshotFlow { animatedScope.transition.isRunning } | ||
.filter { it.not() } | ||
.distinctUntilChanged() | ||
.collect { onEndTransitionAnimation() } | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the display of the language switching switch is not modified so that it is displayed after the animation finishes, in some cases the switch on the Row side is displayed after it is displayed on the Column side for a moment.
So, it was necessary to add a process to detect when the animation had finished.
LanguageSwitcher( | ||
currentLang = currentLang, | ||
onLanguageSelect = onLanguageSelect, | ||
isVisible = isAnimationFinished && isLangSelectable && hasSpaceForLanguageSwitcher, | ||
) | ||
} | ||
LanguageSwitcher( | ||
currentLang = currentLang, | ||
onLanguageSelect = onLanguageSelect, | ||
isVisible = isAnimationFinished && isLangSelectable && hasSpaceForLanguageSwitcher.not(), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having the LanguageSwitcher lined up like this is not a very good process. 🤔
If there is a better implementation, I will follow that. 🫡
AnimatedVisibility( | ||
visible = isVisible, | ||
enter = fadeIn(), | ||
exit = ExitTransition.None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is no animation, the language switch suddenly appears after the page display animation is finished, so it doesn't look very good. 🤔
So I've added a fade-in animation.
Now that we know that FlowRow does not require such a complex implementation, we will rebuild the PR. |
Issue
Overview (Required)
Movie (Optional)
before.mp4
before2.mp4
after.mp4
after2.mp4
after3.mp4
Another option
another.option.mp4