public void parseRegError(String error) { showRegProgressbar(false); if (error != null) { Toast.makeText(getContext(), error, Toast.LENGTH_SHORT).show(); presenter.getCodeImage(formInfo.getOnce()); } else { Toast.makeText(getContext(), "注册成功", Toast.LENGTH_SHORT).show(); LoginDialog loginDialog = new LoginDialog(getContext()); dismiss(); loginDialog.show(); } }
@Override public void onClick(View v) { switch (v.getId()) { case R.id.regBtn: showRegProgressbar(true); formInfo.setNameValue(mInputName.getText().toString()); formInfo.setPswValue(mInputPwd.getText().toString()); formInfo.setEmailValue(mInputEmail.getText().toString()); formInfo.setCodeValue(mInputCode.getText().toString()); presenter.register(formInfo); showRegProgressbar(true); break; } }
public void parseRegCode(RegFormModel formInfo) { this.formInfo = formInfo; presenter.getCodeImage(formInfo.getOnce()); }
@Override public void onDetachedFromWindow() { super.onDetachedFromWindow(); presenter.detachView(); }
@Override public void onAttachedToWindow() { super.onAttachedToWindow(); presenter.attachView(this); presenter.getRegisterCode(); }