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
enum ThumbnailsViewFragment.FilterModes  
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. 
class ThumbnailsViewFragment.Theme  
enum ThumbnailsViewFragment.ThumbnailsViewEditOptions  
Constants
int FILTER_MODE_ANNOTATED
int FILTER_MODE_BOOKMARKED
int FILTER_MODE_NORMAL
String TAG
Fields
public static boolean HANDLE_INTENT_IN_ACTIVITY
Public Constructors
ThumbnailsViewFragment()
Public Methods
void addDocPages()
Adds document pages.
static Bundle createThumbnailViewFragmentBundle(boolean readOnly, boolean editMode, int[] hideFilterModes, String[] hideEditOptions)
ThumbnailsViewAdapter getAdapter()
static getPages(PDFViewCtrl pdfViewCtrl, int mode)
static ThumbnailsViewFragment newInstance(boolean readOnly, boolean editMode, int[] hideFilterModes)
Returns a new instance of the class
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
static ThumbnailsViewFragment newInstance(boolean readOnly, boolean editMode, int[] hideFilterModes, String[] hideEditOptions)
Returns a new instance of the class
void onActivityResult(int requestCode, int resultCode, Intent data)
void onConfigurationChanged(Configuration newConfig)
void onCreate(Bundle savedInstanceState)
View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
void onDestroyView()
void onDismiss(DialogInterface dialog)
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 onPagesMoved(List<Integer> fromPages, int toPageNum)
Called when pages were moved to a new position
void onResume()
void onSaveInstanceState(Bundle outState)
void onStart()
void onStop()
void onViewCreated(View view, Bundle savedInstanceState)
void setActivePageLabelBackgroundColor(int activePageLabelBackgroundColorInt)
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
void setPageLabelBackgroundColor(int pageLabelBackgroundColorInt)
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 static final String TAG

Constant Value: "thumbnails_fragment"

Fields

public static boolean HANDLE_INTENT_IN_ACTIVITY

Public Constructors

public ThumbnailsViewFragment ()

Public Methods

public void addDocPages ()

Adds document pages.

public static Bundle createThumbnailViewFragmentBundle (boolean readOnly, boolean editMode, int[] hideFilterModes, String[] hideEditOptions)

public ThumbnailsViewAdapter getAdapter ()

Returns
  • The attached adapter

public static getPages (PDFViewCtrl pdfViewCtrl, int mode)

public static ThumbnailsViewFragment newInstance (boolean readOnly, boolean editMode, int[] hideFilterModes)

Returns a new instance of the class

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 static ThumbnailsViewFragment newInstance (boolean readOnly, boolean editMode, int[] hideFilterModes, String[] hideEditOptions)

Returns a new instance of the class

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

public void onConfigurationChanged (Configuration newConfig)

public void onCreate (Bundle savedInstanceState)

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

public void onDestroyView ()

public void onDismiss (DialogInterface dialog)

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 onPagesMoved (List<Integer> fromPages, int toPageNum)

Called when pages were moved to a new position

Parameters
fromPages The page numbers from which the pages move
toPageNum The page number to which the page moves

public void onResume ()

public void onSaveInstanceState (Bundle outState)

public void onStart ()

public void onStop ()

public void onViewCreated (View view, Bundle savedInstanceState)

public void setActivePageLabelBackgroundColor (int activePageLabelBackgroundColorInt)

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 void setPageLabelBackgroundColor (int pageLabelBackgroundColorInt)

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