public class

ThumbnailsViewFragment

extends DialogFragment
implements ThumbnailsViewAdapter.EditPagesListener
java.lang.Object
   ↳ DialogFragment
     ↳ com.pdftron.pdf.controls.ThumbnailsViewFragment

Class Overview

The ThumbnailsViewFragment uses the getThumbAsync(int) to show thumbnails of the documents as a grid view. It supports add/remove/re-arrange pages, as well as rotate/duplicate and export pages. Undo/Redo is also supported.

Summary

Nested Classes
interface ThumbnailsViewFragment.OnExportThumbnailsListener Callback interface to be invoked when pages should be exported. 
interface ThumbnailsViewFragment.OnThumbnailsEditAttemptWhileReadOnlyListener Callback interface to be invoked when the user attempts to edit pages while the document is read only. 
interface ThumbnailsViewFragment.OnThumbnailsViewDialogDismissListener Callback interface to be invoked when the dialog fragment is dismissed. 
Constants
int FILTER_MODE_ANNOTATED
int FILTER_MODE_BOOKMARKED
int FILTER_MODE_NORMAL
Public Constructors
ThumbnailsViewFragment()
Public Methods
void addDocPages()
Adds document pages.
ThumbnailsViewAdapter getAdapter()
static ThumbnailsViewFragment newInstance()
Returns a new instance of the class
static ThumbnailsViewFragment newInstance(boolean readOnly)
Returns a new instance of the class
static ThumbnailsViewFragment newInstance(boolean readOnly, boolean editMode)
Returns a new instance of the class
void onActivityResult(int requestCode, int resultCode, Intent data)
The overload implementation of DialogFragment#onActivityResult(int, int, Intent).
void onConfigurationChanged(Configuration newConfig)
The overload implementation of DialogFragment#onConfigurationChanged(Configuration).
void onCreate(Bundle savedInstanceState)
The overload implementation of DialogFragment#onCreate(Bundle).
View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
The overload implementation of DialogFragment#onCreateView(LayoutInflater, ViewGroup, Bundle).
void onDestroyView()
void onDismiss(DialogInterface dialog)
The overload implementation of DialogFragment#onDismiss(DialogInterface).
void onPageMoved(int fromPageNum, int toPageNum)
The overload implementation of onPageMoved(int, int).
void onPagesAdded(List<Integer> pageList)
The overload implementation of onPagesAdded(List).
void onResume()
The overload implementation of DialogFragment#onResume().
void onSaveInstanceState(Bundle outState)
The overload implementation of DialogFragment#onSaveInstanceState(Bundle).
void onStart()
void onStop()
void onViewCreated(View view, Bundle savedInstanceState)
The overload implementation of DialogFragment#onViewCreated(View, Bundle).
void setItemChecked(int position)
Sets the specified item as checked.
void setOnExportThumbnailsListener(ThumbnailsViewFragment.OnExportThumbnailsListener listener)
Sets the OnThumbnailsViewDialogDismissListener listener
void setOnThumbnailsEditAttemptWhileReadOnlyListener(ThumbnailsViewFragment.OnThumbnailsEditAttemptWhileReadOnlyListener listener)
Sets the OnThumbnailsViewDialogDismissListener listener
void setOnThumbnailsViewDialogDismissListener(ThumbnailsViewFragment.OnThumbnailsViewDialogDismissListener listener)
Sets the OnThumbnailsViewDialogDismissListener listener
ThumbnailsViewFragment setPdfViewCtrl(PDFViewCtrl pdfViewCtrl)
Sets the PDFViewCtrl.
void setTitle(String title)
Sets the title.
void updateSpanCount(int count)
Updates span count.
void updateUndoRedoIcons()
Updates undo/redo icons
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.pdftron.pdf.controls.ThumbnailsViewAdapter.EditPagesListener

Constants

public static final int FILTER_MODE_ANNOTATED

Constant Value: 1 (0x00000001)

public static final int FILTER_MODE_BOOKMARKED

Constant Value: 2 (0x00000002)

public static final int FILTER_MODE_NORMAL

Constant Value: 0 (0x00000000)

Public Constructors

public ThumbnailsViewFragment ()

Public Methods

public void addDocPages ()

Adds document pages.

public ThumbnailsViewAdapter getAdapter ()

Returns
  • The attached adapter

public static ThumbnailsViewFragment newInstance ()

Returns a new instance of the class

public static ThumbnailsViewFragment newInstance (boolean readOnly)

Returns a new instance of the class

public static ThumbnailsViewFragment newInstance (boolean readOnly, boolean editMode)

Returns a new instance of the class

public void onActivityResult (int requestCode, int resultCode, Intent data)

The overload implementation of DialogFragment#onActivityResult(int, int, Intent).

public void onConfigurationChanged (Configuration newConfig)

The overload implementation of DialogFragment#onConfigurationChanged(Configuration).

public void onCreate (Bundle savedInstanceState)

The overload implementation of DialogFragment#onCreate(Bundle).

public View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)

The overload implementation of DialogFragment#onCreateView(LayoutInflater, ViewGroup, Bundle).

public void onDestroyView ()

public void onDismiss (DialogInterface dialog)

The overload implementation of DialogFragment#onDismiss(DialogInterface).

public void onPageMoved (int fromPageNum, int toPageNum)

The overload implementation of onPageMoved(int, int).

Parameters
fromPageNum The page number from which the page moves
toPageNum The page number to which the page moves

public void onPagesAdded (List<Integer> pageList)

The overload implementation of onPagesAdded(List).

Parameters
pageList The list of pages added to the document

public void onResume ()

The overload implementation of DialogFragment#onResume().

public void onSaveInstanceState (Bundle outState)

The overload implementation of DialogFragment#onSaveInstanceState(Bundle).

public void onStart ()

public void onStop ()

public void onViewCreated (View view, Bundle savedInstanceState)

The overload implementation of DialogFragment#onViewCreated(View, Bundle).

public void setItemChecked (int position)

Sets the specified item as checked.

Parameters
position The position

public void setOnExportThumbnailsListener (ThumbnailsViewFragment.OnExportThumbnailsListener listener)

Sets the OnThumbnailsViewDialogDismissListener listener

Parameters
listener The listener

public void setOnThumbnailsEditAttemptWhileReadOnlyListener (ThumbnailsViewFragment.OnThumbnailsEditAttemptWhileReadOnlyListener listener)

Sets the OnThumbnailsViewDialogDismissListener listener

Parameters
listener The listener

public void setOnThumbnailsViewDialogDismissListener (ThumbnailsViewFragment.OnThumbnailsViewDialogDismissListener listener)

Sets the OnThumbnailsViewDialogDismissListener listener

Parameters
listener The listener

public ThumbnailsViewFragment setPdfViewCtrl (PDFViewCtrl pdfViewCtrl)

Sets the PDFViewCtrl.

Parameters
pdfViewCtrl Sets the PDFViewCtrl
Returns
  • The instance of the class

public void setTitle (String title)

Sets the title.

Parameters
title The title

public void updateSpanCount (int count)

Updates span count.

Parameters
count The span count

public void updateUndoRedoIcons ()

Updates undo/redo icons