code: public void attemptLogin() {
  
          // Reset errors.
          mEmail.setError(null);
          mPassword.setError(null);
  
          // Check for a valid email address.
          if (TextUtils.isEmpty(mEmail.getText())) {
              mEmail.setError(getString(R.string.error_field_required));
              return;
          }
  
          q.task(new CocoTask<String>() {
              @Override
              public String backgroundWork() throws Exception {
                  Thread.sleep(2000);
                  return "Hello ";
              }
  
              @Override
              public void callback(String result) {
                  q.toast(result+mEmail.getText());
                 // q.startActivity(ListAct.class);
              }
  
              @Override
              public void pre() {
                  q.v(mLoginStatusMessage).text(R.string.login_progress_signing_in);
              }
          }.progress(mLoginStatus).view(mLoginForm));
      }
docs: Attempts to sign in or register the account specified by the login form.
  If there are form errors (invalid email, missing fields, etc.), the
  errors are presented and no actual login attempt is made.