user766090
user766090

Reputation:

question on autocompletetextview in android

I have written a logic where by default if anyone wants to clear the conents of autocompletetextview(AV) then it will become one. But I want when I bring focus inside AV then it should be clear.

Upvotes: 1

Views: 693

Answers (1)

MByD
MByD

Reputation: 137282

Use onFocusChanged to detect a change in the focus, and if it just lost focus, check the content. otherwise clear the data.

Upvotes: 1

Related Questions