We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a82c03 commit c0118bbCopy full SHA for c0118bb
1 file changed
fragmentation_core/src/main/java/me/yokeyword/fragmentation/helper/internal/VisibleDelegate.java
@@ -177,7 +177,11 @@ private void dispatchChild(boolean visible) {
177
}
178
179
private boolean isParentInvisible() {
180
- ISupportFragment fragment = (ISupportFragment) mFragment.getParentFragment();
+ Fragment parentFragment = mFragment.getParentFragment();
181
+ ISupportFragment fragment = null;
182
+ if (parentFragment instanceof ISupportFragment) { //此处强转是否要check? 在获得了parentManager的时候
183
+ fragment = (ISupportFragment) parentFragment;
184
+ }
185
return fragment != null && !fragment.isSupportVisible();
186
187
0 commit comments