Class SimpleSearchResultListener
-
- All Implemented Interfaces:
-
com.pspdfkit.ui.search.PdfSearchView.Listener
public abstract class SimpleSearchResultListener implements PdfSearchView.Listener
Empty implementation of the PdfSearchView.Listener interface.
-
-
Constructor Summary
Constructors Constructor Description SimpleSearchResultListener()
-
Method Summary
Modifier and Type Method Description void
onSearchStarted(@NonNull() String searchTerm)
Called by the PdfSearchView once it has started searching the document. void
onMoreSearchResults(@NonNull() List<SearchResult> results)
Called every time the PdfSearchView has a new chunk of SearchResult instances. void
onSearchCompleted()
Called by the PdfSearchView as soon as it has finished the search. void
onSearchCleared()
Called by the PdfSearchView when the current search results have been cleared. void
onSearchError(@NonNull() Throwable error)
Called by the PdfSearchView if search could not be completed because of an error
.void
onSearchResultSelected(@Nullable() SearchResult result)
Called by the PdfSearchView if the user touched a SearchResult, providing the actual result
as an argument, ornull
if the previous search result selection was cleared.-
-
Method Detail
-
onSearchStarted
void onSearchStarted(@NonNull() String searchTerm)
Called by the PdfSearchView once it has started searching the document.
- Parameters:
searchTerm
- The term which is searched.
-
onMoreSearchResults
void onMoreSearchResults(@NonNull() List<SearchResult> results)
Called every time the PdfSearchView has a new chunk of SearchResult instances. The listener implementation must be abel to handle multiple subsequent calls, since the search view may call this method multiple times during a search.
- Parameters:
results
- The next chunk of search results.
-
onSearchCompleted
void onSearchCompleted()
Called by the PdfSearchView as soon as it has finished the search.
-
onSearchCleared
void onSearchCleared()
Called by the PdfSearchView when the current search results have been cleared. This may be called if the user clears and hides the search view.
-
onSearchError
void onSearchError(@NonNull() Throwable error)
Called by the PdfSearchView if search could not be completed because of an
error
.- Parameters:
error
- Throwable describing the error.
-
onSearchResultSelected
void onSearchResultSelected(@Nullable() SearchResult result)
Called by the PdfSearchView if the user touched a SearchResult, providing the actual
result
as an argument, ornull
if the previous search result selection was cleared.- Parameters:
result
- The touched SearchResult, ornull
if the previous search result selection was cleared.
-
-
-
-