package com.wenyu.ylive.base;

import android.os.Bundle;

import com.wenyu.mvp.presenter.BaseMvpPresenter;


/**
 * Created by jiacheng.li on 17/1/11.
 * Copyright © 2016年 扇贝网(shanbay.com).
 * All rights reserved.
 */
public abstract class YLiveActivity extends BizActivity {

	private BaseMvpPresenter<?, ?> mBaseMvpPresenter;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(contentId());

		if (mBaseMvpPresenter != null) {
			mBaseMvpPresenter.attach();
		}
	}

	@Override
	protected void onDestroy() {

		if (mBaseMvpPresenter != null) {
			mBaseMvpPresenter.detach();
		}

		super.onDestroy();
	}

	public void bindPresenter(BaseMvpPresenter<?, ?> mvpPresenter) {
		mBaseMvpPresenter = mvpPresenter;
	}

	abstract protected int contentId();
}

@@ -273,60 +273,9 @@
 y %7B%0A
-%0A%09private BaseMvpPresenter%3C?, ?%3E mBaseMvpPresenter;%0A
+%09
 %0A%09@O
@@ -408,327 +408,13 @@
 ());
-%0A%0A%09%09if (mBaseMvpPresenter != null) %7B%0A%09%09%09mBaseMvpPresenter.attach();%0A%09%09%7D%0A%09%7D%0A%0A%09@Override%0A%09protected void onDestroy() %7B%0A%0A%09%09if (mBaseMvpPresenter != null) %7B%0A%09%09%09mBaseMvpPresenter.detach();%0A%09%09%7D%0A%0A%09%09super.onDestroy();%0A%09%7D%0A%0A%09public void bindPresenter(BaseMvpPresenter%3C?, ?%3E mvpPresenter) %7B%0A%09%09mBaseMvpPresenter = mvpPresenter;
 %0A%09%7D%0A
+%09
 %0A%09ab

Update YLiveActivity.java