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; }
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; }