How to empty edittext without setText("");
A function for that would be:
fun setTextViewEmpty(textView: TextView){
(textView as EditText ).text.clear() }
inspired by this
you can use following way
Kotlin:
myEditText.text.clear()
Java:
EditText myEditText = ((EditText) findViewById(R.id.yoursXmlId));
myEditText.getText().clear()
Another option is: EditText.getText().clear();
But you'll have to cast anyway:
((EditText) findViewById(R.id.yoursXmlId)).getText().clear();