diff options
author | Scott Main <smain@google.com> | 2011-06-27 14:14:37 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-06-27 14:14:37 -0700 |
commit | 0868f458ccc5f0e690aea5209522156285a9c0b0 (patch) | |
tree | 7ba5e7c63de5bac276c7f741f2240cc49e3e0d9b /docs/html/guide | |
parent | 4971c3c4a1525bff1c4622f6df08ce22c05720cf (diff) | |
parent | 7c58d671d542f3a9923a9ea2e63b46005d81a445 (diff) | |
download | frameworks_base-0868f458ccc5f0e690aea5209522156285a9c0b0.zip frameworks_base-0868f458ccc5f0e690aea5209522156285a9c0b0.tar.gz frameworks_base-0868f458ccc5f0e690aea5209522156285a9c0b0.tar.bz2 |
am 7c58d671: am f169bae8: am f8d37ab6: Merge "docs: add emphasis to adding a search button in activity UI" into honeycomb-mr2
* commit '7c58d671d542f3a9923a9ea2e63b46005d81a445':
docs: add emphasis to adding a search button in activity UI
Diffstat (limited to 'docs/html/guide')
-rw-r--r-- | docs/html/guide/topics/search/index.jd | 8 | ||||
-rw-r--r-- | docs/html/guide/topics/search/search-dialog.jd | 65 |
2 files changed, 37 insertions, 36 deletions
diff --git a/docs/html/guide/topics/search/index.jd b/docs/html/guide/topics/search/index.jd index 7ac5ff1..218511b 100644 --- a/docs/html/guide/topics/search/index.jd +++ b/docs/html/guide/topics/search/index.jd @@ -52,7 +52,13 @@ example of the search dialog with optional search suggestions.</p> <p class="note"><strong>Note</strong>: The search framework does <em>not</em> provide APIs to search your data. To perform a search, you need to use APIs appropriate for your data. For example, if your data is stored in an SQLite database, you should use the {@link android.database.sqlite} -APIs to perform searches.</p> +APIs to perform searches. +<br/><br/> +Also, there is no guarantee that every device provides a dedicated SEARCH button to invoke the +search interface in your application. When using the search dialog or a custom interface, you +must always provide a search button in your UI that activates the search interface. For more +information, see <a href="search-dialog.html#InvokingTheSearchDialog">Invoking the search +dialog</a>.</p> <p>The following documents show you how to use Android's framework to implement search:</p> diff --git a/docs/html/guide/topics/search/search-dialog.jd b/docs/html/guide/topics/search/search-dialog.jd index af6c8f2..d869a44 100644 --- a/docs/html/guide/topics/search/search-dialog.jd +++ b/docs/html/guide/topics/search/search-dialog.jd @@ -17,29 +17,30 @@ access</li> <h2>In this document</h2> <ol> -<li><a href="#TheBasics">The Basics</a></li> -<li><a href="#SearchableConfiguration">Creating a Searchable Configuration</a></li> -<li><a href="#SearchableActivity">Creating a Searchable Activity</a> - <ol> - <li><a href="#DeclaringSearchableActivity">Declaring a searchable activity</a></li> - <li><a href="#EnableSearch">Enabling the search dialog and search widget</a></li> - <li><a href="#PerformingSearch">Performing a search</a></li> - </ol> -</li> -<li><a href="#UsingTheSearchDialog">Using the Search Dialog</a> - <ol> - <li><a href="#LifeCycle">The impact of the search dialog on your activity lifecycle</a></li> - <li><a href="#SearchContextData">Passing search context data</a></li> - </ol> -</li> -<li><a href="#UsingSearchWidget">Using the Search Widget</a> - <ol> - <li><a href="#ConfiguringWidget">Configuring the search widget</a></li> - <li><a href="#WidgetFeatures">Other search widget features</a></li> - </ol> -</li> -<li><a href="#VoiceSearch">Adding Voice Search</a></li> -<li><a href="#SearchSuggestions">Adding Search Suggestions</a></li> + <li><a href="#TheBasics">The Basics</a></li> + <li><a href="#SearchableConfiguration">Creating a Searchable Configuration</a></li> + <li><a href="#SearchableActivity">Creating a Searchable Activity</a> + <ol> + <li><a href="#DeclaringSearchableActivity">Declaring a searchable activity</a></li> + <li><a href="#PerformingSearch">Performing a search</a></li> + </ol> + </li> + <li><a href="#SearchDialog">Using the Search Dialog</a> + <ol> + <li><a href="#InvokingTheSearchDialog">Invoking the search dialog</a></li> + <li><a href="#LifeCycle">The impact of the search dialog on your activity lifecycle</a></li> + <li><a href="#SearchContextData">Passing search context data</a></li> + </ol> + </li> + <li><a href="#UsingSearchWidget">Using the Search Widget</a> + <ol> + <li><a href="#ConfiguringWidget">Configuring the search widget</a></li> + <li><a href="#WidgetFeatures">Other search widget features</a></li> + <li><a href="#UsingBoth">Using both the widget and the dialog</a></li> + </ol> + </li> + <li><a href="#VoiceSearch">Adding Voice Search</a></li> + <li><a href="#SearchSuggestions">Adding Search Suggestions</a></li> </ol> <h2>Key classes</h2> @@ -494,13 +495,13 @@ searches.</p> <h3 id="InvokingTheSearchDialog">Invoking the search dialog</h3> -<p>As mentioned above, the device SEARCH button and {@link android.app.Activity#onSearchRequested -onSearchRequested()} method will open the search dialog, as long as the current activity -has declared the searchable activity to use, as shown in the previous section.</p> +<p>As mentioned above, the device SEARCH button will open the search dialog as long as the current +activity has declared in the manifest the searchable activity to use.</p> -<p>However, you should not assume that a SEARCH button is available on the user's device. You -should always provide another search button in your UI that activates the search dialog by calling -{@link android.app.Activity#onSearchRequested()}.</p> +<p>However, some devices do not include a dedicated SEARCH button, so you should not assume that +it's always available. When using the search dialog, you must <strong>always provide another search +button in your UI</strong> that activates the search dialog by calling {@link +android.app.Activity#onSearchRequested()}.</p> <p>For instance, you should either provide a menu item in your <a href="{@docRoot}guide/topics/ui/menus.html#options-menu">Options Menu</a> or a button in your @@ -510,12 +511,6 @@ href="{@docRoot}shareables/search_icons.zip">search_icons.zip</a> file includes medium and high density screens, which you can use for your search menu item or button (low-density screens scale-down the hdpi image by one half). </p> -<!-- ... maybe this should go into the Creating Menus document .... -<p>If you chose to provide a shortcut key for the menu item, using {@link -android.view.MenuItem#setAlphabeticShortcut(char)}, then SearchManager.MENU_KEY is the recommended -key character, representing the default search key.</p> ---> - <p>You can also enable "type-to-search" functionality, which activates the search dialog when the user starts typing on the keyboard—the keystrokes are inserted into the search dialog. You can enable type-to-search in your activity by calling |