找传奇、传世资源到传世资源站!

android mvp开发模式实例源码(高仿微信)

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

android mvp开发模式实例源码(高仿微信) Android平台开发-第1张

android mvp开发模式实例源码(高仿微信) Android平台开发-第2张
android mvp开发模式实例源码(高仿微信) Android平台开发-第3张 package com.idisfkj.hightcopywx.ui.presenter;import android.content.Intent;import android.graphics.Bitmap;import android.net.Uri;import android.widget.EditText;import com.idisfkj.hightcopywx.R;import com.idisfkj.hightcopywx.ui.model.RegisterModel;import com.idisfkj.hightcopywx.ui.model.RegisterModelImp;import com.idisfkj.hightcopywx.ui.view.RegisterView;/** * Created by idisfkj on 16/4/28. * Email : idisfkj@qq.com. */public class RegisterPresenterImp implements RegisterPresenter, RegisterModelImp.saveDataListener, RegisterModelImp.sendAllListener { private RegisterView mRegisterView; private RegisterModel mRegisterModel; public RegisterPresenterImp(RegisterView mRegisterView) { this.mRegisterView = mRegisterView; mRegisterModel = new RegisterModelImp(); } @Override public void switchUserLine(boolean hasFocus,int id) { switch (id){ case R.id.userName_et: mRegisterView.changeUserNameLine(hasFocus); break; case R.id.userPhone_et: mRegisterView.changeUserPhoneLine(hasFocus); break; case R.id.userPassword_et: mRegisterView.changeUserPasswordLine(hasFocus); break; } } @Override public void registerInfo(EditText... editTexts) { mRegisterView.showProgressDialog(); mRegisterModel.saveData(this,editTexts); } @Override public void choosePicture() { mRegisterView.showAlertDialog(); } @Override public void callCrop(Uri uri) { mRegisterView.startCrop(uri); } @Override public void getPicture(Intent intent) { mRegisterView.setHeadPicture(intent); } @Override public void savePicture(Bitmap bitmap) { mRegisterView.saveHeadPicture(bitmap); } @Override public void onSucceed(String userName,String number) { mRegisterModel.sendAll(this,userName,number); } @Override public void onSendSucceed() { mRegisterView.hideProgressDialog(); mRegisterView.showSucceedToast(); mRegisterView.jumpMainActivity(); } @Override public void onError() { mRegisterView.hideProgressDialog(); mRegisterView.showErrorToast(); }}

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复