We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
看了wiki示例,对于路由到Fragment这节: https://github.com/didi/DRouter/wiki/1.-Router#fragment%E5%AF%BC%E8%88%AA 是否存在同步式路由带Fragment的调用方式?类似于 Fragment f = DRouter.build("didi://router/message").start();
在像ViewPager+DRouter这种场景的时候,需要获取到多个Fragment再设置到Adapter中,会有这种需求。
tks!
The text was updated successfully, but these errors were encountered:
我会重新考虑一下,不过目前有同步方式获取到Fragment,参考以下
protected @NonNull Fragment newFragment(String uri) { final Fragment[] fragments = {null}; DRouter.build(uri).start(null, new RouterCallback() { @Override public void onResult(@NonNull Result result) { fragments[0] = result.getFragment(); } }); if (fragments[0] == null) { return new EmptyFragment(); } return fragments[0]; }
Sorry, something went wrong.
No branches or pull requests
看了wiki示例,对于路由到Fragment这节:
https://github.com/didi/DRouter/wiki/1.-Router#fragment%E5%AF%BC%E8%88%AA
是否存在同步式路由带Fragment的调用方式?类似于
Fragment f = DRouter.build("didi://router/message").start();
在像ViewPager+DRouter这种场景的时候,需要获取到多个Fragment再设置到Adapter中,会有这种需求。
tks!
The text was updated successfully, but these errors were encountered: