to top
Android APIs
Sample Code >

SearchableDictionary - Searchable Dictionary v2

← Back

A sample application that demonstrates Android's search framework.

This application includes a dictionary of words. By invoking the Android search dialog inside the app (via the device search button or Menu > Search), you can perform a search across the dictionary. As you type, suggestions will appear, which you can select to view the complete definition. You can also execute the search to view all word definitions that match the entered text. The application also allows Quick Search Box (Android's system-wide search) to provide dictionary suggestions.

The code in this application demonstrates how to:

  • Implement a search interface using Android's search framework
  • Provide custom search suggestions and offer them in Quick Search Box
  • Create an SQLite database and an FTS3 table for full-text searches
  • Create a content provider to perform all search and suggestion queries
  • Use SimpleCursorAdapter to bind data from a Cursor to a ListView.


  • Updated for Android 3.0 to use the Action Bar and the SearchView widget as an action item. (Available in the Samples for SDK API 11.)

See also:

Note: For the original version of Searchable Dictionary, which reads words from a file instead of a database and uses a custom BaseAdapter, see the SDK samples included with the platforms for API Level 4-6.