Ejemplo n.º 1
0
  private String getComment() {

    String comment = etComment.getText().toString();
    if (TextUtils.isEmpty(comment)) {
      btnSendComment.startAnimation(AnimationUtils.loadAnimation(this, R.anim.shake_error));
      return null;
    }

    comment = dialogManager.sendRequest(comment);

    if (TextUtils.isEmpty(comment)) {
      btnSendComment.startAnimation(AnimationUtils.loadAnimation(this, R.anim.shake_error));
      return null;
    }

    return comment;
  }
Ejemplo n.º 2
0
  private String getUserInput() {

    String userInput = etComment.getText().toString();
    if (TextUtils.isEmpty(userInput)) {
      btnSendComment.startAnimation(AnimationUtils.loadAnimation(this, R.anim.shake_error));
      return null;
    }

    return userInput;
  }