com.actionbarsherlock.widget
Interface SearchView.OnSuggestionListener

Enclosing class:
SearchView

public static interface SearchView.OnSuggestionListener

Callback interface for selection events on suggestions. These callbacks are only relevant when a SearchableInfo has been specified by SearchView.setSearchableInfo(android.app.SearchableInfo).


Method Summary
 boolean onSuggestionClick(int position)
          Called when a suggestion was clicked.
 boolean onSuggestionSelect(int position)
          Called when a suggestion was selected by navigating to it.
 

Method Detail

onSuggestionSelect

boolean onSuggestionSelect(int position)
Called when a suggestion was selected by navigating to it.

Parameters:
position - the absolute position in the list of suggestions.
Returns:
true if the listener handles the event and wants to override the default behavior of possibly rewriting the query based on the selected item, false otherwise.

onSuggestionClick

boolean onSuggestionClick(int position)
Called when a suggestion was clicked.

Parameters:
position - the absolute position of the clicked item in the list of suggestions.
Returns:
true if the listener handles the event and wants to override the default behavior of launching any intent or submitting a search query specified on that item. Return false otherwise.


Copyright © 2012-2013. All Rights Reserved.