Compartir a través de


SearchView.IOnQueryTextListener.OnQueryTextSubmit(String) Method

Definition

Called when the user submits the query.

[Android.Runtime.Register("onQueryTextSubmit", "(Ljava/lang/String;)Z", "GetOnQueryTextSubmit_Ljava_lang_String_Handler:Android.Widget.SearchView/IOnQueryTextListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool OnQueryTextSubmit (string? query);
[<Android.Runtime.Register("onQueryTextSubmit", "(Ljava/lang/String;)Z", "GetOnQueryTextSubmit_Ljava_lang_String_Handler:Android.Widget.SearchView/IOnQueryTextListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnQueryTextSubmit : string -> bool

Parameters

query
String

the query text that is to be submitted

Returns

true if the query has been handled by the listener, false to let the SearchView perform the default action.

Attributes

Remarks

Called when the user submits the query. This could be due to a key press on the keyboard or due to pressing a submit button. The listener can override the standard behavior by returning true to indicate that it has handled the submit request. Otherwise return false to let the SearchView handle the submission by launching any associated intent.

Java documentation for android.widget.SearchView.OnQueryTextListener.onQueryTextSubmit(java.lang.String).

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.

Applies to