示例#1
0
  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();
                  }
                });
          }
        });
  }
示例#2
0
 public void clear() {
   mIUserView.clearUserName();
   mIUserView.clearPassWord();
 }