Some test text!

platform
search

Thumbnail browser

Contents

Show page thumbnails dialog
Export pages
Dialog callbacks
This tutorial only applies to Xamarin.Android.

The ThumbnailsViewFragment class allows users to edit pages of a document including add, remove, re-arrange, rotate and duplicate pages. Users are also able to undo/redo page manipulations.

linkShow page thumbnails dialog

To show a page thumbnails dialog in your activity, create a new instance of ThumbnailsViewFragment by calling newInstance() and setting the PDFViewCtrl:

var thumbDialog = ThumbnailsViewFragment.NewInstance();
thumbDialog.SetPdfViewCtrl(mPdfViewCtrl);
thumbDialog.SetStyle((int)DialogFragmentStyle.NoTitle, Resource.Style.CustomAppTheme);
thumbDialog.Show(this.SupportFragmentManager, "thumbnails_dialog");

If you want to specify that the document is read-only you can use newInstance(boolean):

var thumbDialog = ThumbnailsViewFragment.NewInstance(true);

linkExport pages

If you would like to allow users to export a subset of pages from the document, you should implement OnExportThumbnailsListener interface by providing implementation for exporting pages:

thumbDialog.ExportThumbnails += (sender, e) =>
{
    // Implementation for exporting given pages.
};

If you set OnExportThumbnailsListener, the "Export" menu item will show up in the overflow menu when at least one page is selected.

linkDialog callbacks

If you want to be notified when the thumbnails view dialog fragment is dismissed, implement OnThumbnailsViewDialogDismissListener interface. Also, if you want to be notified when the user attempts to edit pages while the document is read only you should implement OnThumbnailsEditAttemptWhileReadOnlyListener interface:

thumbDialog.ThumbnailsViewDialogDismiss += (sender, e) =>
{
    // Handle viewer when the thumbnails view dialog is dismissed.
};
thumbDialog.ThumbnailsEditAttemptWhileReadOnly += (sender, e) =>
{
    // Show message when user attempts to edit pages of a read only document.
};

Get the anwsers you need: Support

Contents

Show page thumbnails dialog
Export pages
Dialog callbacks