Skip to content

startWithPop方法, #717

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
yanshihao3 opened this issue Jan 2, 2018 · 4 comments
Closed

startWithPop方法, #717

yanshihao3 opened this issue Jan 2, 2018 · 4 comments
Labels

Comments

@yanshihao3
Copy link

加载根fragment后,startFragment 如何让根fragment的pop

@yanshihao3
Copy link
Author

使用startwithpop方法,有时候会出行 当前的fragment不会隐藏,要跳转的不会显示,但是栈中存在的是要跳转的fragment

@YoKeyword
Copy link
Owner

@yanshihao3 是v1.2.0添加了队列机制的原因,pop后start()的时机变了,稍后修复该问题

@yanshihao3
Copy link
Author

@YoKeyword loadRootFragment(R.id.fl_container, SplashFragment.newInstance());
如何把SplashFragment pop出栈,使用startWithPop无效果,是在activity中重新loadRootFragment一下吗

@YoKeyword
Copy link
Owner

YoKeyword commented Jan 2, 2018

@yanshihao3 最新版:v1.2.3 :startWithPop()已支持RootFragment

另外也可以使用下面的方法达到目的(这种方法的NextFragment的根布局需要指定一个background):

// SplashFragment中:
popTo(SplashFragment.class,true,new Runnable(){
      @Override
      public void run() {
            // 若想有动画,popTo(fg,true,runnable,R.anim.fragment_pop_exit) + loadRootFragment(container,fg,true,true)即可
           ((SupportActivity) _mActivity).loadRootFragment(R.id.fl_container, NextFragment.newInstance());
      }
});

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

No branches or pull requests

2 participants