renaudcerrato / FloatingSearchView

Yet another floating search view implementation, also known as persistent search.
Apache License 2.0
1.33k stars 161 forks source link

search being called twice #14

Closed Julienpraad closed 8 years ago

Julienpraad commented 8 years ago

Hello public void onSearchAction(CharSequence text) is being called twice when the search of the keyboard is clicked

how can we stop that ?

Thank you

renaudcerrato commented 8 years ago

Hi Julien,

Can you produce a small test unit to reproduce that issue?

Julienpraad commented 8 years ago

Hey yes of course.. just remove everything inside of it and replace it with a simple toast .. or an intent to a new activity.. if u used a toast for example it will be displayed twice in a row .. or a new activity is created twice.. so when u press back inside of it you have to do it twice in order to go back

renaudcerrato commented 8 years ago

A test unit would be fine, really =)

Julienpraad commented 8 years ago

I am new to github maybe I misunderstood what is a test unit

renaudcerrato commented 8 years ago

An unit test is a small piece of code, usually run from the command line, which can only output "SUCCESS" or "FALSE". In case of issues like this, it will simply give me a quick way to confirm your bug and easily confirm it by simply running that unit test.

AfzalivE commented 8 years ago

You can call mSearchView.setActivated(false) in onSearchAction(CharSequence text) to avoid this. That's how the sample does it too.

Julienpraad commented 8 years ago

Thanks a lot for the reply and sorry for my late one. I did it in another way however I changed it now to your simple way