Skip to content

Commit 13afdf2

Browse files
committed
修复LazyFragment 的 onCreateViewLazy(Bundle savedInstanceState) 避免获取不到 savedInstanceState
1 parent 25baeeb commit 13afdf2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/main/java/com/shizhefei/fragment/LazyFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ public class LazyFragment extends BaseFragment {
3232
@Deprecated
3333
protected final void onCreateView(Bundle savedInstanceState) {
3434
super.onCreateView(savedInstanceState);
35+
this.savedInstanceState = savedInstanceState;
3536
Bundle bundle = getArguments();
3637
if (bundle != null) {
3738
isLazyLoad = bundle.getBoolean(INTENT_BOOLEAN_LAZYLOAD, isLazyLoad);
3839
}
3940
if (isLazyLoad) {
4041
if (getUserVisibleHint() && !isInit) {
4142
isInit = true;
42-
this.savedInstanceState = savedInstanceState;
4343
onCreateViewLazy(savedInstanceState);
4444
} else {
4545
LayoutInflater layoutInflater = inflater;

0 commit comments

Comments
 (0)