-
Notifications
You must be signed in to change notification settings - Fork 272
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
查找tag为null,startFragment报错 #80
Labels
Comments
不建议保存 Fragment 对象,使用 Rigger,你只需要保存 Fragment tag 即可。
之后你需要的时候通过 tag 去进行操作 Fragment.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
添加tag
Fragment fragment = LoginSelectIdentityFragment.newInstance(); Rigger.getRigger(fragment).setFragmentTag(LoginSelectIdentityFragment.class.getName()); Rigger.getRigger(puppet).startFragment(fragment);
查找tag
Fragment fragment = Rigger.getRigger(this) .findFragmentByTag(LoginSelectIdentityFragment.class.getName());
这时查找的fragment总是为null,然后我又Rigger.getRigger(puppet).startFragment(LoginSelectIdentityFragment),结果就报错了。这是为什么啊?
The text was updated successfully, but these errors were encountered: