View mode dialog
ViewModePickerDialogFragment allows users to: pick page layout mode, select page color mode, rotate pages, and crop pages.

Show view mode dialog
To show a view mode dialog in your activity, create a new instance of ViewModePickerDialogFragment by calling newInstance(PagePresentationMode, boolean, boolean, int):
Set view mode dialog listener
In order to let users pick PDF page presentation mode, color mode, etc. you need to implement the corresponding events in the ViewModePickerDialogFragment instance.
In ViewModeSelected, the selected view mode values are defined in PdfViewCtrlSettingsManager and include the following:
View Mode
Description
Value
KEY_PREF_VIEWMODE_CONTINUOUS_VALUE
Single page in continuous mode is selected.
"continuous"
KEY_PREF_VIEWMODE_SINGLEPAGE_VALUE
Single page presentation mode is selected.
"singlepage"
KEY_PREF_VIEWMODE_FACING_VALUE
Facing two pages presentation mode is selected.
"facing"
KEY_PREF_VIEWMODE_FACINGCOVER_VALUE
Facing two pages with odd page number on right side of PDF is selected.
"facingcover"
KEY_PREF_VIEWMODE_FACING_CONT_VALUE
In continuous mode, Facing two pages presentation mode is selected.
"facing_cont"
KEY_PREF_VIEWMODE_FACINGCOVER_CONT_VALUE
In continuous mode, Facing two pages with odd page number on right side of PDF is selected.
"facingcover_cont"
KEY_PREF_VIEWMODE_ROTATION_VALUE
Rotate pdf pages is selected.
"rotation"
KEY_PREF_VIEWMODE_USERCROP_VALUE
User-level crop pages is selected.
"user_crop"
To learn about setting page presentation mode, see PDFViewCtrl page presentation mode .
Last updated
Was this helpful?