Searchable

To make search appear to the user as a seamless system-wide feature, the Android framework offers APIs that let applications control how they are searched. Applications can customize how search is invoked, how the search dialog looks, and what type of search results are available, including suggestions that are shown as the user types.

In order to utilize the Android search framework, an application must provide a search configuration in the form of an XML resource. This section describes the search configuration XML in terms of its syntax and usage. For a more complete discussion about how to implement search features for your application, see SearchManager.

Source file format: XML file requiring a <?xml version="1.0" encoding="utf-8"?> declaration, and a root <searchable> element. Resource source file location: res/xml/searchable.xml (The file name is arbitrary, but standard practice is to use searchable.xml.)

• Java: R.style. stylelD for the whole style, R.style. stylelD.itemlD for an individual setting

• XML: @[ package :]style/stylelD for a whole style, @[package:] style/ stylelD/ itemlD for an individual item. Note: to refer to a value in the currently applied theme, use "?" instead of as described below (XML).

Syntax

Compiled resource datatype: Resource pointer to an xml object.

Resource reference name:

• XML: @[package :]xml/ filename (e.g., @xml/searchable).

Syntax

0 0

Post a comment