I am using the latest Sherlock Searchview widget. I have a simple requirement/Use case.
1. User expands the search view by touching the magnifying glass icon.
2. User types in a search text, Software Key board is visible now.
3. I accept the text and do some web search.
4. The web result, I am showing in a pop up AlertDialog with a list box.
5. At this point, the soft keyboard and the search view is visible in the background. fine.
6. When the user selects an item from the AlertDialog list box, I am closing the AlertDialog. My work is done for search text now.
At this point I would like to close/lower the soft keyboard and collapse the Searchview edit box. I read some some posts about using onOptionsItemSelected() for the edit box and closing it there. I am not sure this is helpful for my requirement.
Is there way send a message/call API to search view widget or edit box or close button within search view to close/collapse them (which also lowers the soft key board) and go back original state with the magnifying glass? (Result is very much like clicking/touching on the "x" button on the search view widget which does the collapsing and lowering the soft keyboard.)
Thank you for any help!