SearchRecentSuggestions.SaveRecentQuery(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Add a query to the recent queries list.
[Android.Runtime.Register("saveRecentQuery", "(Ljava/lang/String;Ljava/lang/String;)V", "GetSaveRecentQuery_Ljava_lang_String_Ljava_lang_String_Handler")]
public virtual void SaveRecentQuery (string? queryString, string? line2);
[<Android.Runtime.Register("saveRecentQuery", "(Ljava/lang/String;Ljava/lang/String;)V", "GetSaveRecentQuery_Ljava_lang_String_Ljava_lang_String_Handler")>]
abstract member SaveRecentQuery : string * string -> unit
override this.SaveRecentQuery : string * string -> unit
Parameters
- queryString
- String
The string as typed by the user. This string will be displayed as the suggestion, and if the user clicks on the suggestion, this string will be sent to your searchable activity (as a new search query).
- line2
- String
If you have configured your recent suggestions provider with
android.content.SearchRecentSuggestionsProvider#DATABASE_MODE_2LINES
, you can
pass a second line of text here. It will be shown in a smaller font, below the primary
suggestion. When typing, matches in either line of text will be displayed in the list.
If you did not configure two-line mode, or if a given suggestion does not have any
additional text to display, you can pass null here.
- Attributes
Remarks
Add a query to the recent queries list. Returns immediately, performing the save in the background.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.