I have several EditText objects with text inside. I want the first time EditText gets focus to remove the text in it, but only the first time.
How can i do this?
Here is an example: I have an EditText called SomeThing with the text "someText" in it. when the user touches SomeThing for the first time, I want "someText" to be deleted. so let's say that the text was deleted, and now the user typed his own text, this time “someOtherText”, and EditText lost focus for another EditText. This time, when the user touches SomeThing, "someOtherText" will not be deleted, because the second time he receives focus.
java android android-edittext
Matan kadosh
source share