SearchListener

interface SearchListener

Search results view listener.

Functions

Link copied to clipboard
abstract fun onError(e: Exception)

Called when error occurs during the search request, i.e. when one of SearchSuggestionsCallback.onError, SearchSelectionCallback.onError, OfflineSearchCallback.onError callbacks called. When this happens, error information is displayed on the view.

Link copied to clipboard
abstract fun onFeedbackItemClick(responseInfo: ResponseInfo)

Called when "Missing result" button is clicked.

Link copied to clipboard
abstract fun onHistoryItemClick(historyRecord: HistoryRecord)

Called when a history item is clicked.

Link copied to clipboard
abstract fun onOfflineSearchResultSelected(searchResult: OfflineSearchResult, responseInfo: OfflineResponseInfo)

Called when a user when a user selects one of the currently displayed OfflineSearchResults.

Link copied to clipboard
abstract fun onOfflineSearchResultsShown(results: List<OfflineSearchResult>, responseInfo: OfflineResponseInfo)

Called when offline search results shown, i.e. when OfflineSearchCallback.onResults callback called.

Link copied to clipboard
abstract fun onPopulateQueryClick(suggestion: SearchSuggestion, responseInfo: ResponseInfo)

Called when search suggestion's "Populate query" button is clicked.

Link copied to clipboard
abstract fun onSearchResultSelected(searchResult: SearchResult, responseInfo: ResponseInfo)

Called when a user retrieves SearchResult from one of currently displayed on the views (i.e. when SearchSelectionCallback.onResult callback is called) or when the user selects one of the currently displayed SearchResult's.

Link copied to clipboard
abstract fun onSearchResultsShown(suggestion: SearchSuggestion, results: List<SearchResult>, responseInfo: ResponseInfo)

Called when multiple search results displayed on the view. This happens when SearchSelectionCallback.onResults callback called.

Link copied to clipboard
abstract fun onSuggestionSelected(searchSuggestion: SearchSuggestion): Boolean

Called when a suggestion is clicked. This allows listeners to get a chance to process click on their own. SearchResultsView will not process the click if this function returns true. If multiple listeners are registered and any of them has processed the click, all the remaining listeners will not be invoked.

Link copied to clipboard
abstract fun onSuggestionsShown(suggestions: List<SearchSuggestion>, responseInfo: ResponseInfo)

Called when the suggestions are received and displayed on the view. This happens when SearchSuggestionsCallback.onSuggestions callback called.