Книга: Beginning Android

Searching for Meaning in Randomness

Searching for Meaning in Randomness

Given all that, search is now available — Android knows your application is searchable and what search domain to use when searching from the main activity, and the activity knows how to do the search.

The options menu for this application has both local and global search options. In the case of local search, we just call onSearchRequested(); in the case of global search, we call startSearch() with true in the last parameter, indicating the scope is global.

Typing in a letter or two then clicking Search, will bring up the search activity and the subset of words containing what you typed, with your search query in the activity title bar. You can get the same effect if you just start typing in the main activity, since it is set up for triggering a local search.

Оглавление книги

Оглавление статьи/книги

Генерация: 1.141. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз