Package com.pspdfkit.annotations.links
Class LinkAnnotationHighlighter
-
- All Implemented Interfaces:
-
com.pspdfkit.ui.PageObjectProvider
public class LinkAnnotationHighlighter extends PdfDrawableProvider
PdfDrawableProvider creating highlights based on a LinkAnnotation instances.
-
-
Constructor Summary
Constructors Constructor Description LinkAnnotationHighlighter(Context context)
Creates the link annotation highlighter.
-
Method Summary
Modifier and Type Method Description void
setLinkAnnotation(@Nullable() LinkAnnotation linkAnnotation)
Sets the link annotation to highlight. List<out PdfDrawable>
getDrawablesForPage(@Nullable() Context context, @Nullable() PdfDocument document, @IntRange(from = 0) int pageIndex)
Returns all drawables for the given document
andpageIndex
.-
-
Constructor Detail
-
LinkAnnotationHighlighter
LinkAnnotationHighlighter(Context context)
Creates the link annotation highlighter.- Parameters:
context
- Context used for pulling theme attributes set for the link annotation highlights.
-
-
Method Detail
-
setLinkAnnotation
void setLinkAnnotation(@Nullable() LinkAnnotation linkAnnotation)
Sets the link annotation to highlight. Calling this will replace any previously set link annotation.
- Parameters:
linkAnnotation
- link annotation to highlight.
-
getDrawablesForPage
@Nullable() List<out PdfDrawable> getDrawablesForPage(@Nullable() Context context, @Nullable() PdfDocument document, @IntRange(from = 0) int pageIndex)
Returns all drawables for the given
document
andpageIndex
. The framework may call this method on any thread.- Parameters:
context
- Context for resource resolution.document
- The currently loaded PdfDocument.pageIndex
- Number of the page for which the drawables should be returned.- Returns:
A list of all drawables for the given document and page.
-
-
-
-