Skip to content
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

feat(ui): support view switch animation #39

Open
cEvolve05 opened this issue Aug 25, 2024 · 1 comment
Open

feat(ui): support view switch animation #39

cEvolve05 opened this issue Aug 25, 2024 · 1 comment
Assignees
Labels
feature New feature or request
Milestone

Comments

@cEvolve05
Copy link
Member

引入页面显示周期的概念,指从一个页面显示开始,直到页面不再显示。目前的周期如下:

  1. 显示页面
  2. 调用 onShow
  3. 调用 onHide
  4. 隐藏页面

其中会等待第三步函数返回后再执行第四步,但是无法利用这点实现退出动画,因为如果第三步进行等待会导致整个主线程的阻塞。

由此,考虑将隐藏页面的行为,或者通知 ViewManager 隐藏页面的行为委托给 onHide 或是新接口执行,由对应接口使用 asyncExecute 进行非阻塞的等待操作。

另外,当前对 onShow 的调用并不一定保证在显示页面之后,整个 ViewManager 需要进行相应的修改。

@cEvolve05 cEvolve05 added the feature New feature or request label Aug 25, 2024
@cEvolve05 cEvolve05 self-assigned this Aug 25, 2024
@Serein207 Serein207 added this to the beta milestone Aug 29, 2024
@Serein207
Copy link
Member

Serein207 commented Sep 1, 2024

可以考虑动画是否执行作为一个可选项,有些页面切换可以用页面中元素的移动做平滑变换

需要对现有框架做较大更改 上述方案废弃

@Serein207 Serein207 modified the milestones: beta, version1.1 Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants