版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/YHMQ66/article/details/78866501
1.首先在p层定义一个方法(判断V层接口是否不为空)
例如:
public void onBind(){
if(gwcShowV!=null){
gwcShowV = null;
}
}
2.在V层的onDestroy方法中调用 onBind方法(先判断p层的实例不为空)
“`
@Override
protected void onDestroy() {
super.onDestroy();
if(gwcShowPatenter!=null){
gwcShowPatenter.onBind();
}
}
MVP解绑成功。。。。。。。。。。。。。。。