Domanda

I have an EditText with a TextWatcher attached to it and the onChangeText method works flawlessly.

I'd like to add a mini icon/button at the very right end of the EditText, which clears the text and then disappears.

May I have some direction on how to implement this? I don't want source code, but an idea on what mechanism to use. Thank you in advance.

È stato utile?

Soluzione

I would say you have it in your Layout permanently as you want it to look but you normally have the Visibility set to GONE then just set it to VISIBLE when you want it shown.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top