Skip to content

最新版本,startWithPop,两个fragment都出栈了 #391

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
zhangz89 opened this issue Jun 29, 2017 · 3 comments
Closed

最新版本,startWithPop,两个fragment都出栈了 #391

zhangz89 opened this issue Jun 29, 2017 · 3 comments

Comments

@zhangz89
Copy link

A Fragment startWithPop(BFragment),A/B都不见了,1.0.3版本

@zhangz89
Copy link
Author

又调了一下,发现如果A存在 prefragment,就可以正常,如果A是rootfragment,就会出现两个都出栈的情况

@YoKeyword
Copy link
Owner

@zhangz89 是的,pop后再执行start时,fragmentManager传了空,start失败,稍后修复

可以使用下面的方法代替实现:

popTo(A.class,true,new Runnable(){
       @Override
       public void run() {
            start(B);
       }
},getFragmentAnimator().getPopExit()); // getFragmentAnimator().getPopExit() 代表popTo时的动画

YoKeyword added a commit that referenced this issue Jun 29, 2017
@YoKeyword
Copy link
Owner

v1.0.4已放出,已修复 🍺

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