Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

设置页在手机上返回上一页的动画不连贯 #1636

Closed
Him188 opened this issue Feb 4, 2025 · 0 comments
Closed

设置页在手机上返回上一页的动画不连贯 #1636

Him188 opened this issue Feb 4, 2025 · 0 comments
Labels
P1 重要优先级, 需要优先考虑 (Major) s: ui 子系统: UI
Milestone

Comments

@Him188
Copy link
Member

Him188 commented Feb 4, 2025

问题描述

SettingsScreen, 从 detailsPane 返回到 listPane 时, detailsPane 会立即消失屏幕变白, 过一会才会有 listDetail 进入动画.

问题是

detailPane = {
AnimatedContent(
navigator.currentDestination?.contentKey,
Modifier
.fillMaxSize(),
transitionSpec = LocalAniMotionScheme.current.animatedContent.topLevel,

当返回 listPane 时, currentDestination.contentKey 会变为 null (因为没有选中任何设置页), 触发这里 AnimatedContent 动画, 这里用的 topLevel 动画是非常快速的 (200ms), 造成详情页立即消失了.

删除 AnimatedContent 无法解决问题, 因为 currentDestination.contentKey 仍然会变为 null, 这只能让动画变为 snap, 效果应该更差.

这可能是 Compose list detail navigator 的设计缺陷

复现步骤

No response

Ani 版本号

<450a1

操作系统

No response

应用日志

No response

@Him188 Him188 added P1 重要优先级, 需要优先考虑 (Major) s: ui 子系统: UI labels Feb 4, 2025
@Him188 Him188 closed this as completed in 45c4d1f Feb 14, 2025
@Him188 Him188 added this to the 4.5.0 milestone Feb 14, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
P1 重要优先级, 需要优先考虑 (Major) s: ui 子系统: UI
Projects
None yet
Development

No branches or pull requests

1 participant