4

Many apps (Google Play Music, Contacts, Youtube, Spotify) provide search suggestions in what appears to be a custom Fragment whenever you start typing. Implementing the standard search interface found here: http://developer.android.com/guide/topics/search/search-dialog.html really only provides a basic drop down of recent suggestions and then passes the query to your Activity with the SEARCH intent filter. This isn't what the apps mentioned above seem to be using.

Are these apps just overriding the methods in the SearchView in the Action Bar and then passing those values to an adapter (that pulls down information over the network) that updates a Fragment? Are they completely avoiding the standardized search interface? Is there a good example somewhere that shows this updating of a ListFragment based on data from the SearchView?

user1319155
  • 149
  • 8
  • Isn't http://developer.android.com/guide/topics/search/adding-custom-suggestions.html exactly what you want? – tritop Mar 17 '15 at 13:02
  • No, that guide doesn't show anything about dynamically loading search suggestions as I'm typing into an activity or fragment. The apps I mentioned are definitely not using those methods. – user1319155 Mar 18 '15 at 13:36

1 Answers1

1

You'll probably need a custom SearchView. This one is the best according to my research and actual usage.

This is also a strong candidate.

ericn
  • 12,476
  • 16
  • 84
  • 127