use of org.mazhuang.guanggoo.data.OnResponseListener in project guanggoo-android by mzlogin.
the class TopicDetailPresenter method getTopicDetail.
@Override
public void getTopicDetail() {
mView.startLoading();
NetworkTaskScheduler.getInstance().execute(new GetTopicDetailTask(getUrl(), new OnResponseListener<TopicDetail>() {
@Override
public void onSucceed(TopicDetail data) {
mView.stopLoading();
mView.onGetTopicDetailSucceed(data);
}
@Override
public void onFailed(String msg) {
mView.stopLoading();
mView.onGetTopicDetailFailed(msg);
}
}));
}
use of org.mazhuang.guanggoo.data.OnResponseListener in project guanggoo-android by mzlogin.
the class LoginPresenter method login.
@Override
public void login(String email, String password) {
mView.startLoading();
NetworkTaskScheduler.getInstance().execute(new LoginTask(email, password, new OnResponseListener<String>() {
@Override
public void onSucceed(String data) {
mView.stopLoading();
mView.onLoginSucceed(data);
}
@Override
public void onFailed(String msg) {
mView.stopLoading();
mView.onLoginFailed(msg);
}
}));
}
Aggregations