Skip to content

rootfragment的onEnterAnimationEnd会执行两次 #551

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

Closed
pye52 opened this issue Sep 13, 2017 · 1 comment
Closed

rootfragment的onEnterAnimationEnd会执行两次 #551

pye52 opened this issue Sep 13, 2017 · 1 comment

Comments

@pye52
Copy link
Contributor

pye52 commented Sep 13, 2017

#541 修复了rootfragment无动画的问题之后,其onEnterAnimationEnd会执行两次。看了一下源码…发现在onActivityCreated会直接调用notifyEnterAnimEnd,然后动画完了之后又再次调用。而文档里说的是

该方法会在转场动画结束后调用,如果没有动画则在onActivityCreated时调用,此时在onEnterAnimtionEnd(Bundle saveInstanceState)里初始化复杂数据,可以避免保证Fragment动画的流畅。

那么数据就会被初始化2次了…

YoKeyword added a commit that referenced this issue Sep 13, 2017
Fix #551, fix the fragment loaded by `loadRootFragment()` was callback twice
@YoKeyword
Copy link
Owner

YoKeyword commented Sep 13, 2017

感谢,今晚发布


@pye52 已发布 v1.1.6 🍺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants