首页 > 其他 > 详细

新建 SecondPresenter 实现类

时间:2019-08-04 19:33:35      阅读:73      评论:0      收藏:0      [点我收藏+]

package com.test.mvp.mvpdemo.mvp.v6.presenter;

import com.test.mvp.mvpdemo.mvp.v6.SecondContract;
import com.test.mvp.mvpdemo.mvp.v6.basemvp.BasePresenter;
import com.test.mvp.mvpdemo.mvp.v6.model.SecondModel;
import java.io.IOException;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Response;

public class SecondPresenter extends BasePresenter<SecondContract.ISecondView, SecondModel> implements SecondContract.ISecondPresenter {

@Override
public void handlerData() {
getView().showDialog();

getModel().requestBaidu(new Callback() {
@Override
public void onFailure(Call call, IOException e) {
}

@Override
public void onResponse(Call call, Response response) throws IOException {
String content = response.body().string(http://www.amjmh.com);
getView().succes(content);
}
});
}
}

新建 SecondPresenter 实现类

原文:https://www.cnblogs.com/ly570/p/11299123.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!