From 72e0df65730d9e836db0f71b7443bcf1e0bbcc50 Mon Sep 17 00:00:00 2001 From: Scott Main Date: Thu, 23 Jun 2011 12:02:10 -0700 Subject: [PATCH] docs: add emphasis to adding a search button in activity UI Change-Id: I13c4673cdb8caab65dd8d57046f54b0ae3bf48e2 --- docs/html/guide/topics/search/index.jd | 8 ++- .../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 7ac5ff1455bb4..218511b2a8e44 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.

Note: The search framework does not 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.

+APIs to perform searches. +

+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 Invoking the search +dialog.

The following documents show you how to use Android's framework to implement search:

diff --git a/docs/html/guide/topics/search/search-dialog.jd b/docs/html/guide/topics/search/search-dialog.jd index af6c8f2a82da2..d869a44ba67a7 100644 --- a/docs/html/guide/topics/search/search-dialog.jd +++ b/docs/html/guide/topics/search/search-dialog.jd @@ -17,29 +17,30 @@ access

In this document

    -
  1. The Basics
  2. -
  3. Creating a Searchable Configuration
  4. -
  5. Creating a Searchable Activity -
      -
    1. Declaring a searchable activity
    2. -
    3. Enabling the search dialog and search widget
    4. -
    5. Performing a search
    6. -
    -
  6. -
  7. Using the Search Dialog -
      -
    1. The impact of the search dialog on your activity lifecycle
    2. -
    3. Passing search context data
    4. -
    -
  8. -
  9. Using the Search Widget -
      -
    1. Configuring the search widget
    2. -
    3. Other search widget features
    4. -
    -
  10. -
  11. Adding Voice Search
  12. -
  13. Adding Search Suggestions
  14. +
  15. The Basics
  16. +
  17. Creating a Searchable Configuration
  18. +
  19. Creating a Searchable Activity +
      +
    1. Declaring a searchable activity
    2. +
    3. Performing a search
    4. +
    +
  20. +
  21. Using the Search Dialog +
      +
    1. Invoking the search dialog
    2. +
    3. The impact of the search dialog on your activity lifecycle
    4. +
    5. Passing search context data
    6. +
    +
  22. +
  23. Using the Search Widget +
      +
    1. Configuring the search widget
    2. +
    3. Other search widget features
    4. +
    5. Using both the widget and the dialog
    6. +
    +
  24. +
  25. Adding Voice Search
  26. +
  27. Adding Search Suggestions

Key classes

@@ -494,13 +495,13 @@ searches.

Invoking the search dialog

-

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.

+

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.

-

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()}.

+

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 always provide another search +button in your UI that activates the search dialog by calling {@link +android.app.Activity#onSearchRequested()}.

For instance, you should either provide a menu item in your Options Menu or a button in your @@ -510,12 +511,6 @@ href="{@docRoot}shareables/search_icons.zip">search_icons.zip 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).

- -

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