package me.alzz.mvp;

import android.app.Activity;
import android.app.Fragment;
import android.content.Context;
import android.support.annotation.CallSuper;

/**
 * mvp简单的Fragment实现类
 * Created by jeremyhe on 2017/9/12.
 */

public class BaseMvpFragment extends Fragment implements IView {

    @CallSuper
    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);
        Presenter.init(activity);
        Presenter.bind(this);
    }
}

@@ -105,16 +105,41 @@
 ontext;%0A
+import android.os.Build;%0A
 import a
@@ -487,11 +487,227 @@
 );%0A    %7D
+%0A%0A    @Override%0A    public Context getContext() %7B%0A        if (Build.VERSION.SDK_INT %3C Build.VERSION_CODES.M) %7B%0A            return getActivity();%0A        %7D else %7B%0A            return super.getContext();%0A        %7D%0A    %7D
 %0A%7D%0A

fix getContext