@@ -6,14 +6,6 @@ parent.link=index.html
66<div id="qv-wrapper">
77<div id="qv">
88
9- <h2>Quickview</h2>
10- <ul>
11- <li>The Android system sends search queries from the search dialog or widget to an activity you
12- specify to perform searches and present results</li>
13- <li>You can put the search widget in the Action Bar, as an "action view," for quick
14- access</li>
15- </ul>
16-
179
1810<h2>In this document</h2>
1911<ol>
@@ -61,14 +53,8 @@ Dictionary</a></li>
6153
6254<h2>Downloads</h2>
6355<ol>
64- <li><a href="{@docRoot}shareables/search_icons.zip">search_icons.zip</a></li>
65- </ol>
66-
67- <h2>See also</h2>
68- <ol>
69- <li><a href="adding-recent-query-suggestions.html">Adding Recent Query Suggestions</a></li>
70- <li><a href="adding-custom-suggestions.html">Adding Custom Suggestions</a></li>
71- <li><a href="searchable-config.html">Searchable Configuration</a></li>
56+ <li><a href="{@docRoot}design/downloads/index.html#action-bar-icon-pack">Action Bar
57+ Icon Pack</a></li>
7258</ol>
7359
7460</div>
@@ -142,12 +128,14 @@ data, and displays the search results.</p></li>
142128 <li>A search interface, provided by either:
143129 <ul>
144130 <li>The search dialog
145- <p>By default, the search dialog is hidden, but appears at the top of the screen when the
146- user presses the device SEARCH button (when available) or another button in your user interface.</p>
131+ <p>By default, the search dialog is hidden, but appears at the top of the screen when
132+ you call {@link android.app.Activity#onSearchRequested()} (when the user presses your
133+ Search button).</p>
147134 </li>
148135 <li>Or, a {@link android.widget.SearchView} widget
149136 <p>Using the search widget allows you to put the search box anywhere in your activity.
150- Instead of putting it in your activity layout, however, it's usually more convenient for users as an
137+ Instead of putting it in your activity layout, you should usually use
138+ {@link android.widget.SearchView} as an
151139<a href="{@docRoot}guide/topics/ui/actionbar.html#ActionView">action view in the Action Bar</a>.</p>
152140 </li>
153141 </ul>
@@ -415,10 +403,9 @@ searchable activity that performs the search. However, if you are developing
415403your application for devices running Android 3.0, you should consider using the search widget
416404instead (see the side box).</p>
417405
418- <p>The search dialog is always hidden by default, until the user activates it. If the user's device
419- includes a SEARCH button, pressing it will activate the search dialog by default. Your application
420- can also activate the search dialog on demand by calling {@link
421- android.app.Activity#onSearchRequested onSearchRequested()}. However, neither of these work
406+ <p>The search dialog is always hidden by default, until the user activates it. Your application
407+ can activate the search dialog by calling {@link
408+ android.app.Activity#onSearchRequested onSearchRequested()}. However, this method doesn't work
422409until you enable the search dialog for the activity.</p>
423410
424411<p>To enable the search dialog, you must indicate to the system which searchable activity should
@@ -469,8 +456,8 @@ search dialog:</p>
469456href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code <meta-data>}</a>
470457element to declare which searchable activity to use for searches, the activity has enabled the
471458search dialog.
472- While the user is in this activity, the device SEARCH button (if available) and the {@link
473- android.app.Activity#onSearchRequested onSearchRequested()} method will activate the search dialog.
459+ While the user is in this activity, the {@link
460+ android.app.Activity#onSearchRequested onSearchRequested()} method activates the search dialog.
474461When the user executes the search, the system starts {@code SearchableActivity} and delivers it
475462the {@link android.content.Intent#ACTION_SEARCH} intent.</p>
476463
@@ -495,21 +482,22 @@ searches.</p>
495482
496483<h3 id="InvokingTheSearchDialog">Invoking the search dialog</h3>
497484
498- <p>As mentioned above, the device SEARCH button will open the search dialog as long as the current
499- activity has declared in the manifest the searchable activity to use.</p>
500-
501- <p>However, some devices do not include a dedicated SEARCH button, so you should not assume that
502- it's always available. When using the search dialog, you must <strong>always provide another search
503- button in your UI</strong> that activates the search dialog by calling {@link
504- android.app.Activity#onSearchRequested()}.</p>
505-
506- <p>For instance, you should either provide a menu item in your <a
507- href="{@docRoot}guide/topics/ui/menus.html#options-menu">Options Menu</a> or a button in your
508- activity layout that
509- activates search by calling {@link android.app.Activity#onSearchRequested()}. The <a
510- href="{@docRoot}shareables/search_icons.zip">search_icons.zip</a> file includes icons for
511- medium and high density screens, which you can use for your search menu item or button (low-density
512- screens scale-down the hdpi image by one half). </p>
485+ <p>Although some devices provide a dedicated Search button, the behavior of the button may vary
486+ between devices and many devices do not provide a Search button at all. So when using the search
487+ dialog, you <strong>must provide a search button in your UI</strong> that activates the search
488+ dialog by calling {@link android.app.Activity#onSearchRequested()}.</p>
489+
490+ <p>For instance, you should add a Search button in your <a
491+ href="{@docRoot}guide/topics/ui/menus.html#options-menu">Options Menu</a> or UI
492+ layout that calls {@link android.app.Activity#onSearchRequested()}. For consistency with
493+ the Android system and other apps, you should label your button with the Android Search icon that's
494+ available from the <a href="{@docRoot}design/downloads/index.html#action-bar-icon-pack">Action Bar
495+ Icon Pack</a>.</p>
496+
497+ <p class="note"><strong>Note:</strong> If your app uses the <a
498+ href="{@docRoot}guide/topics/ui/actionbar.html">action bar</a>, then you should not use
499+ the search dialog for your search interface. Instead, use the <a href="#UsingSearchWidget">search
500+ widget</a> as a collapsible view in the action bar.</p>
513501
514502<p>You can also enable "type-to-search" functionality, which activates the search dialog when the
515503user starts typing on the keyboard—the keystrokes are inserted into the search dialog. You can
0 commit comments