arimorty / floatingsearchview

A search view that implements a floating search bar also known as persistent search
https://github.com/arimorty/floatingsearchview/blob/master/README.md
Apache License 2.0
3.54k stars 667 forks source link

Hitting back on focus only dismisses soft keyboard #96

Closed ghost closed 8 years ago

ghost commented 8 years ago

With EditText focused and soft keyboard shown, hitting back on the phone only dismisses the keyboard. I can't intercept that event when soft input is shown. I would like to also hide the FloatingSearchView, kind of like how the Google Play Store search works. Otherwise, you need to press back twice.

arimorty commented 8 years ago

@oveledar if you find a way to know when the soft keyboard is dismissed, then you can call clearSearchFocus() then, but knowing when that happens is out of the scope of this library.

ozv101 commented 8 years ago

@arimorty the only way is to subclass the EditText. anyway to modify the project to all this?http://stackoverflow.com/questions/3425932/detecting-when-user-has-dismissed-the-soft-keyboard

arimorty commented 8 years ago

@oveledar it looks like EditText has a callback where we can detect when the back button releases the IME which is in our case the soft keyboard. That's great, I will add a property/flag for that in release 2.0.2.

Thanks, Ari