Skip to content Skip to sidebar Skip to footer

Android Search Interface -- Multiple Searchviews Being Displayed

I'm trying to incorporate search functionality into one of my applications and I'm having problems solving an issue with multiple SearchViews being displayed. So, when I click the

Solution 1:

It seems like you're double-implementing the search interface in 2 different ways. If you take a look at the official docs on setting up a search interface in the action bar, you'll note it makes no mention of calling startSearch in onOptionsItemSelected. Try removing that from onOptionsItemSelected and see what happens.

Edit: Upon further research, it looks like you might have tried implementing both of the implementations outlined here, but only one or the other is necessary (though one only works on Honeycomb and above unless you're using ABS or AppCompat).

Post a Comment for "Android Search Interface -- Multiple Searchviews Being Displayed"