-1

I have a EditText and near to it I have a button with the cross.

What I want is to know the Function to put in my ButtonX.setOnclickListener to clear the EditText !!

is that something like setClear() or something ?

Thank you !

Sitansu
  • 3,225
  • 8
  • 34
  • 61
Nemka
  • 100
  • 11

1 Answers1

0

try this:

//inside onClick
yourEditText.setText("");

doing this, you set a empty text

MikeKeepsOnShine
  • 1,730
  • 4
  • 23
  • 35