blob: 4f753e65b73141567a88720329f0359fb6454a11 [file] [log] [blame]
Scott Main50992e82009-08-29 13:08:18 -07001<p>A sample application that demonstrates Android's search framework.</p>
2
Scott Mainbeca3af2010-03-25 17:37:25 -07003<p>This application includes a dictionary of words. By invoking the Android search dialog inside the
4app (via the device search button or Menu > Search), you can perform a search
Scott Main50992e82009-08-29 13:08:18 -07005across the dictionary. As you type, suggestions will appear, which you can select
Scott Mainbeca3af2010-03-25 17:37:25 -07006to view the complete definition. You can also execute the search to view all word definitions
Scott Main05bd6732010-04-22 11:01:17 -07007that match the entered text. The application also allows Quick Search Box (Android's system-wide
8search) to provide dictionary suggestions.</p>
Scott Mainbeca3af2010-03-25 17:37:25 -07009
10<p>The code in this application demonstrates how to:</p>
11<ul>
12 <li>Implement a search interface using Android's search framework</li>
13 <li>Provide custom search suggestions and offer them in Quick Search Box</li>
Scott Main05bd6732010-04-22 11:01:17 -070014 <li>Create an SQLite database and an FTS3 table for full-text searches</li>
15 <li>Create a <a href="../../../guide/topics/providers/content-provider.html">content
16provider</a> to perform all search and suggestion queries</li>
17 <li>Use <code><a
18href="../../../reference/android/widget/SimpleCursorAdapter.html">SimpleCursorAdapter</a></code> to
19bind data from a Cursor to a ListView.</li>
Scott Mainbeca3af2010-03-25 17:37:25 -070020</ul>
21
Scott Main50992e82009-08-29 13:08:18 -070022<p>See also:</p>
23<ul>
Scott Mainbeca3af2010-03-25 17:37:25 -070024 <li><a href="../../../guide/topics/search/index.html">Search Developer Guide</a></li>
Scott Main50992e82009-08-29 13:08:18 -070025</ul>
26
Scott Main05bd6732010-04-22 11:01:17 -070027<p class="note"><strong>Note:</strong> For the original version of Searchable Dictionary, which
28reads words from a file instead of a database and uses a custom <code><a
29href="../../../reference/android/widget/BaseAdapter.html">BaseAdapter</a></code>, see the SDK
30samples included with the platforms for API Level 4-6.</p>
31
Scott Mainbeca3af2010-03-25 17:37:25 -070032
Scott Main50992e82009-08-29 13:08:18 -070033<img src="../images/SearchableDictionary1.png" />
Scott Main05bd6732010-04-22 11:01:17 -070034<img src="../images/SearchableDictionary2.png" />