public void login() { mIUserView.showLoading(); mIUser.login( mIUserView.getUserName(), mIUserView.getPassWord(), new OnLoginListener() { @Override public void loginSuccess(final User user) { mHandler.post( new Runnable() { @Override public void run() { mIUserView.toMianActivity(user); mIUserView.hideLoading(); } }); } @Override public void loginFailed() { mHandler.post( new Runnable() { @Override public void run() { mIUserView.showFailedError(); mIUserView.hideLoading(); } }); } }); }
public void clear() { mIUserView.clearUserName(); mIUserView.clearPassWord(); }