Methods Summary |
---|
public static java.lang.CharSequence | getQuery(android.view.View searchView)Returns the query string currently in the text field.
return IMPL.getQuery(searchView);
|
public static boolean | isIconified(android.view.View searchView)Returns the current iconified state of the SearchView.
return IMPL.isIconified(searchView);
|
public static boolean | isQueryRefinementEnabled(android.view.View searchView)Returns whether query refinement is enabled for all items or only specific ones.
return IMPL.isQueryRefinementEnabled(searchView);
|
public static boolean | isSubmitButtonEnabled(android.view.View searchView)Returns whether the submit button is enabled when necessary or never displayed.
return IMPL.isSubmitButtonEnabled(searchView);
|
public static android.view.View | newSearchView(android.content.Context context)Creates a new SearchView.
return IMPL.newSearchView(context);
|
public static void | setIconified(android.view.View searchView, boolean iconify)Iconifies or expands the SearchView. Any query text is cleared when iconified. This is
a temporary state and does not override the default iconified state set by
setIconifiedByDefault(boolean). If the default state is iconified, then
a false here will only be valid until the user closes the field. And if the default
state is expanded, then a true here will only clear the text field and not close it.
IMPL.setIconified(searchView, iconify);
|
public static void | setImeOptions(android.view.View searchView, int imeOptions)Sets the IME options on the query text field. This is a no-op if
called on pre-{@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH}
platforms.
IMPL.setImeOptions(searchView, imeOptions);
|
public static void | setInputType(android.view.View searchView, int inputType)Sets the input type on the query text field. This is a no-op if
called on pre-{@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH}
platforms.
IMPL.setInputType(searchView, inputType);
|
public static void | setMaxWidth(android.view.View searchView, int maxpixels)Makes the view at most this many pixels wide
IMPL.setMaxWidth(searchView, maxpixels);
|
public static void | setOnCloseListener(android.view.View searchView, android.support.v4.widget.SearchViewCompat$OnCloseListenerCompat listener)Sets a listener to inform when the user closes the SearchView.
IMPL.setOnCloseListener(searchView, listener.mListener);
|
public static void | setOnQueryTextListener(android.view.View searchView, android.support.v4.widget.SearchViewCompat$OnQueryTextListenerCompat listener)Sets a listener for user actions within the SearchView.
IMPL.setOnQueryTextListener(searchView, listener.mListener);
|
public static void | setQuery(android.view.View searchView, java.lang.CharSequence query, boolean submit)Sets a query string in the text field and optionally submits the query as well.
IMPL.setQuery(searchView, query, submit);
|
public static void | setQueryHint(android.view.View searchView, java.lang.CharSequence hint)Sets the hint text to display in the query text field. This overrides any hint specified
in the SearchableInfo.
IMPL.setQueryHint(searchView, hint);
|
public static void | setQueryRefinementEnabled(android.view.View searchView, boolean enable)Specifies if a query refinement button should be displayed alongside each suggestion
or if it should depend on the flags set in the individual items retrieved from the
suggestions provider. Clicking on the query refinement button will replace the text
in the query text field with the text from the suggestion. This flag only takes effect
if a SearchableInfo has been specified with {@link #setSearchableInfo(View, ComponentName)}
and not when using a custom adapter.
IMPL.setQueryRefinementEnabled(searchView, enable);
|
public static void | setSearchableInfo(android.view.View searchView, android.content.ComponentName searchableComponent)Sets the SearchableInfo for this SearchView. Properties in the SearchableInfo are used
to display labels, hints, suggestions, create intents for launching search results screens
and controlling other affordances such as a voice button.
IMPL.setSearchableInfo(searchView, searchableComponent);
|
public static void | setSubmitButtonEnabled(android.view.View searchView, boolean enabled)Enables showing a submit button when the query is non-empty. In cases where the SearchView
is being used to filter the contents of the current activity and doesn't launch a separate
results activity, then the submit button should be disabled.
IMPL.setSubmitButtonEnabled(searchView, enabled);
|