1

I have a simple AutoCompleteTextView in linear layout. I couldn't detect the keyboard close event. How to remove the focus of AutoCompleteTextView if soft keyboard is closed(Either finished editing or stopped editing without any text). Need simple code. I have tried some help given here but didn't help.

skyconfusion
  • 123
  • 8

1 Answers1

1

check the second answer for the following question:

Detecting when user has dismissed the soft keyboard (the one marked correct is not a real solution)

all you need to do is apply it to AutoCompleteTextView and where it allows you to detect the close. set focus to another view as shown here

How to remove focus without setting focus to another control?

or you could do something using this: How to check visibility of software keyboard in Android?

Community
  • 1
  • 1
Mo1989
  • 1,934
  • 1
  • 13
  • 17