java.lang.IllegalStateException: Fragment has not been attached yet.
来源:11-3 多布局Section列表实现与分类列表点击事件
码_致远
2017-09-01
private void switchContent(SortContentDelegate delegate) {
final XiaoXuDelegate contentDelegate =
SupportHelper.findFragment(SORT_DELEGATE_PARENT.getChildFragmentManager(),
SortContentDelegate.class);
if (contentDelegate != null) {
contentDelegate.getSupportDelegate().replaceFragment(delegate, false);//是否加入回退栈
}
}
执行findFragment时出现 java.lang.IllegalStateException: Fragment has not been attached yet.异常
写回答
1回答
-
ImoocZhang
2017-09-16
你好,看一下你调用的时机对不对!
00
相似问题
组件化模块之间直接的调用
回答 1
关于右侧content的变化问题
回答 1