Annotation dialog fragment

In this document
chevron_rightListener
chevron_rightRead-only

The AnnotationDialogFragment dialog class shows a list of all annotations in a document being viewed by a PDFViewCtrl. The list contains any comments that have been added to the annotations.

Show annotation dialog

To create a new instance of the annotation dialog fragment call newInstance() and set the PDFViewCtrl:

AnnotationDialogFragment annotationDialogFragment = AnnotationDialogFragment.newInstance()
    .setPdfViewCtrl(pdfViewCtrl);
annotationDialogFragment.setStyle(DialogFragment.STYLE_NO_TITLE, R.style.CustomAppTheme);
annotationDialogFragment.show(fragmentManager, "annotation_dialog");

Listener

You can set a listener via setAnnotationDialogListener(AnnotationDialogListener) to be notified when an annotation item is clicked, or when document annotations are exported to a PDF doc when users click on the export floating action button.

Read-only

If the document has write access, users can delete existing annotations by long-pressing on the annotation. To specify whether the document is read-only call setReadOnly(boolean).