how to have clear button on edittext in android code example Example: clear edittext android editText.getText().clear();