172
CHAPTER 8: APIs
The resulting Cursor must return the following fields (shown are constant
names):
BaseColumns._ID
This is a (technically) unique ID you must provide.
SearchManager.SUGGEST_COLUMN_TEXT_1
This is the search suggestion.
SearchManager.SUGGEST_COLUMN_TEXT_2
(optional) This is a second, less important string representing an
annotation text.
SearchManager.SUGGEST_COLUMN_ICON_1
(optional) This is a drawable resource ID, content, or file URI string for
an icon to be shown on the left.
SearchManager.SUGGEST_COLUMN_ICON_2
(optional) This is a drawable resource ID, content, or file URI string for
an icon to be shown on the right.
SearchManager.SUGGEST_COLUMN_INTENT_ACTION
(optional) This is an intent action string that is used to call an intent
when the suggestion gets clicked.
SearchManager.SUGGEST_COLUMN_INTENT_DATA
This is an intent data member to be sent with the intent.
SearchManager.SUGGEST_COLUMN_INTENT_DATA_ID
This is a string to be appended to the intent data member.
SearchManager.SUGGEST_COLUMN_INTENT_EXTRA_DATA
This is extra data to be sent with the intent.
SearchManager.SUGGEST_COLUMN_QUERY
This is the original query string.
SearchManager.SUGGEST_COLUMN_SHORTCUT_ID
This is used when providing suggestions for the quick search box. It
indicates whether a search suggestion should be stored as a shortcut
and whether it should be validated.
SearchManager.SUGGEST_COLUMN_SPINNER_WHILE_ REFRESHING
This is used when providing suggestions for the quick search box; a
spinner should be shown instead of the icon from SUGGEST_COLUMN_
ICON_2 while the shortcut of this suggestion is being refreshed in the
quick search box.
Do'stlaringiz bilan baham: |