SearchResultHighlighter

PdfDrawableProvider creating highlights based on a list of SearchResult instances.

Constructors

Link copied to clipboard
constructor(@NonNull context: Context)
Creates the search result highlighter.

Functions

Link copied to clipboard
Adds the given results to the set of previously added results.
Link copied to clipboard
Clears all previously selected search results.
Link copied to clipboard
open fun getDrawablesForPage(@NonNull context: Context, @NonNull document: PdfDocument, @IntRange(from = 0) pageIndex: Int): List<PdfDrawable>
Returns all drawables for the given document and pageIndex.
Link copied to clipboard
Returns padding of the highlighted search result used when pop-out animating the currently selected search result.
Link copied to clipboard
Returns padding of the highlighted search result used when highlighting annotations.
Link copied to clipboard
Returns color of the highlighted search result.
Link copied to clipboard
Returns border color of the highlighted search result.
Link copied to clipboard
Returns border width of the highlighted search result.
Link copied to clipboard
Returns ratio between corner radius of the search result rectangle and its height.
Link copied to clipboard
Returns maximal corner radius of the highlighted search result.
Link copied to clipboard
Returns minimal corner radius of the highlighted search result.
Link copied to clipboard
@IntRange(from = 0)
open fun getSearchResultPadding(): Int
Returns padding of the the highlighted search result used when highlighting document text.
Link copied to clipboard
open fun setSearchResultAnimationPadding(@IntRange(from = 0) searchResultAnimationPadding: Int)
Sets padding of the highlighted search result used when pop-out animating the currently selected search result.
Link copied to clipboard
open fun setSearchResultAnnotationPadding(@IntRange(from = 0) searchResultAnnotationPadding: Int)
Sets padding of the highlighted search result used when highlighting annotations.
Link copied to clipboard
open fun setSearchResultBackgroundColor(@ColorInt searchResultBackgroundColor: Int)
Sets color of the highlighted search result.
Link copied to clipboard
open fun setSearchResultBorderColor(@ColorInt searchResultBorderColor: Int)
Sets border color of the highlighted search result.
Link copied to clipboard
open fun setSearchResultBorderWidth(@IntRange(from = 0) searchResultBorderWidth: Int)
Sets border width of the highlighted search result.
Link copied to clipboard
open fun setSearchResultCornerRadiusToHeightRatio(@FloatRange(from = 0) searchResultCornerRadiusToHeightRatio: Float)
Sets ratio between corner radius of the search result rectangle and its height.
Link copied to clipboard
open fun setSearchResultMaxCornerRadius(@IntRange(from = 0) searchResultMaxCornerRadius: Int)
Sets maximal corner radius of the highlighted search result.
Link copied to clipboard
open fun setSearchResultMinCornerRadius(@IntRange(from = 0) searchResultMinCornerRadius: Int)
Sets minimal corner radius of the highlighted search result.
Link copied to clipboard
open fun setSearchResultPadding(@IntRange(from = 0) searchResultPadding: Int)
Sets padding of the the highlighted search result used when highlighting document text.
Link copied to clipboard
Sets new search results.
Link copied to clipboard
open fun setSelectedSearchResult(@Nullable newSelectedSearchResult: SearchResult)
Marks a single search results as selected, deselecting any previously selected search result.