using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace efunbox_xyyf_windows.baseMvp { public class BasePresenter { protected V mView; /** * 绑定view,一般在初始化中调用该方法 * * @param view view */ public void attachView(V view) { this.mView = view; } /** * 解除绑定view,一般在onDestroy中调用 */ public void detachView() { this.mView = default; } /** * View是否绑定 * * @return */ public bool isViewAttached() { return mView != null; } } }