aspose file tools*
The moose likes Android and the fly likes Search View in Theme.AppCompat.Light.DarkActionBar Not Behaving As Expected Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Search View in Theme.AppCompat.Light.DarkActionBar Not Behaving As Expected" Watch "Search View in Theme.AppCompat.Light.DarkActionBar Not Behaving As Expected" New topic
Author

Search View in Theme.AppCompat.Light.DarkActionBar Not Behaving As Expected

Jared Snyder
Ranch Hand

Joined: Mar 07, 2014
Posts: 43
I've posted this issue on Stack Overflow already, 6 days ago. However, nobody has replied with even where I should begin with this issue.

http://stackoverflow.com/questions/22415212/search-view-not-producing-expected-results

There are images provided at the link above, but the overall issue is that I've setup Google Places with search suggestions in my app, using this tutorial as a guide:

http://wptrafficanalyzer.in/blog/adding-google-places-autocomplete-api-as-custom-suggestions-in-android-search-dialog/

When I click on the Search View widget icon, it seems as though my theme is being overridden for some reason. Everything else about the search functionality works just fine, expect for the aforementioned issue. Anybody know anything about why this is happening?
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

Do you have any code to show us what you do to get the search widget or what search widget you are talking about?


Steve
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

If you are using the search dialog provided my Android via the onSearchRequested() method, then I don't think that is configurable to your Theme. Instead, you would use the SearchView that you get from SearchManager. See this article: http://developer.android.com/reference/android/content/ComponentName.html. It explains both the dialog and view and when you would choose one or the other. The SearchView part is at the bottom, and I think adding custom search suggestions works the same.
Jared Snyder
Ranch Hand

Joined: Mar 07, 2014
Posts: 43
Steve Luke wrote:Do you have any code to show us what you do to get the search widget or what search widget you are talking about?


As I had said, the code for this can be seen at the tutorial link provided. Otherwise, it is scattered throughout my own code.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Search View in Theme.AppCompat.Light.DarkActionBar Not Behaving As Expected