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