Fix for #347

I'm really sorry, I totally messed up that fix. Here is the working one.

There are however some issues which I could not resolve viz.the SearchView close button is no longer visible as it now occupies the whole ActionBar apart from the overflow menu item.So I just added some code to collapse the SearchView when it loses focus.