Commit 43bbdc701cbf09a13e396be52e07febd6b7601eb

Authored by 韩亚云
1 parent 83168fea

代码测试基类

app/strike/src/main/java/com/cnlive/strike/MyFragmentView.java
1 package com.cnlive.strike; 1 package com.cnlive.strike;
2 2
3 -import com.hannesdorfmann.mosby3.mvp.MvpView; 3 +import com.cnlive.libs.base.frame.view.BaseView;
4 4
5 -public class MyFragmentView implements MvpView { 5 +public class MyFragmentView extends BaseView {
6 MyFragment fragment; 6 MyFragment fragment;
7 7
8 public MyFragmentView(MyFragment fragment) { 8 public MyFragmentView(MyFragment fragment) {
core/base/src/main/java/com/cnlive/libs/base/frame/fragment/BaseFragment.java
1 package com.cnlive.libs.base.frame.fragment; 1 package com.cnlive.libs.base.frame.fragment;
2 2
3 import android.os.Bundle; 3 import android.os.Bundle;
  4 +import android.util.Log;
4 import android.view.LayoutInflater; 5 import android.view.LayoutInflater;
5 import android.view.View; 6 import android.view.View;
6 import android.view.ViewGroup; 7 import android.view.ViewGroup;
@@ -15,6 +16,7 @@ import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter; @@ -15,6 +16,7 @@ import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter;
15 import com.hannesdorfmann.mosby3.mvp.MvpPresenter; 16 import com.hannesdorfmann.mosby3.mvp.MvpPresenter;
16 import com.hannesdorfmann.mosby3.mvp.MvpView; 17 import com.hannesdorfmann.mosby3.mvp.MvpView;
17 18
  19 +
18 /** 20 /**
19 * MVP Databinding Base Fragment 21 * MVP Databinding Base Fragment
20 * 22 *
@@ -40,11 +42,13 @@ public abstract class BaseFragment<V extends MvpView, P extends MvpBasePresenter @@ -40,11 +42,13 @@ public abstract class BaseFragment<V extends MvpView, P extends MvpBasePresenter
40 42
41 @NonNull 43 @NonNull
42 public V createView() { 44 public V createView() {
  45 + Log.e("sssss", "createView: ");
43 return ReflectUtil.instanceView(0, this.getClass(), this, BaseView.class); 46 return ReflectUtil.instanceView(0, this.getClass(), this, BaseView.class);
44 } 47 }
45 48
46 @Override 49 @Override
47 public P createPresenter() { 50 public P createPresenter() {
  51 + Log.e("sssss", "createPresenter: ");
48 return ReflectUtil.instancePresenter(1, this.getClass(), BasePresenter.class); 52 return ReflectUtil.instancePresenter(1, this.getClass(), BasePresenter.class);
49 } 53 }
50 54