|
|
@@ -2,7 +2,9 @@ package com.miekir.mvp.view.model;
|
|
|
|
|
|
import android.os.Bundle;
|
|
|
import android.text.TextUtils;
|
|
|
+import android.view.View;
|
|
|
|
|
|
+import androidx.annotation.NonNull;
|
|
|
import androidx.annotation.Nullable;
|
|
|
import androidx.lifecycle.Observer;
|
|
|
import androidx.lifecycle.ViewModelProvider;
|
|
|
@@ -34,9 +36,7 @@ public abstract class BaseMVPFragment extends BaseFragment implements IView {
|
|
|
private List<BaseViewModel> mInjectPresenters;
|
|
|
|
|
|
@Override
|
|
|
- public void onCreateViewFinished(@Nullable Bundle savedInstanceState) {
|
|
|
- onViewInit();
|
|
|
-
|
|
|
+ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
|
|
// 查找回调方法
|
|
|
if (mDataMethodList.size() == 0) {
|
|
|
Method[] methods = null;
|
|
|
@@ -125,6 +125,7 @@ public abstract class BaseMVPFragment extends BaseFragment implements IView {
|
|
|
}
|
|
|
|
|
|
isViewCreated = true;
|
|
|
+ onViewInit();
|
|
|
loadData();
|
|
|
}
|
|
|
|