I have actually a problem with my Searchview on the Support AppCompat v7 lib 24.0.0.
The SearchView is not shown up no text and input text (look screenshot)
This is very odd. I'm using build tools 25.0.1 and support lib 25.1.0. For me the accepted answer was not necessary, but the way the menu item was defined needs a small change. I need it like so:
Where app:showAsAction
is the key. Lint underlines this as red and tells me:
Should use
android:showAsAction
when using the appcompat library.
However if I have it set to android:showAsAction
then the search view simply does not appear. Go figure.