public class

PdfViewCtrlSettingsManager

extends Object
java.lang.Object
   ↳ com.pdftron.pdf.utils.PdfViewCtrlSettingsManager
Known Direct Subclasses

Class Overview

A utility class helps saving things to SharedPreferences

Summary

Constants
boolean KEY_PREF_SHOW_RAGE_SCROLLING_INFO_DEFAULT_VALUE
boolean KEY_PREF_VERTICAL_SCROLL_SNAP_DEFAULT_VALUE
String KEY_PREF_VIEWMODE_CONTINUOUS_VALUE View mode key: continuous mode
String KEY_PREF_VIEWMODE_FACINGCOVER_CONT_VALUE View mode key: facing cover continuous mode
String KEY_PREF_VIEWMODE_FACINGCOVER_VALUE View mode key: facing cover page mode
String KEY_PREF_VIEWMODE_FACING_CONT_VALUE View mode key: facing continuous mode
String KEY_PREF_VIEWMODE_FACING_VALUE View mode key: facing page mode
String KEY_PREF_VIEWMODE_ROTATION_VALUE View mode key: rotation mode
String KEY_PREF_VIEWMODE_SINGLEPAGE_VALUE View mode key: single page mode
String KEY_PREF_VIEWMODE_THUMBNAILS_VALUE View mode key: thumbnails mode
String KEY_PREF_VIEWMODE_USERCROP_VALUE View mode key: user crop mode
Public Constructors
PdfViewCtrlSettingsManager()
Public Methods
static boolean getAllowPageChangeAnimation(Context context)
Returns whether page should turn with animation when tapping on the left of right edge of the viewer.
static boolean getAllowPageChangeOnTap(Context context)
Returns whether page should turn when tapping on the left of right edge of the viewer.
static boolean getAnnotListShowAuthor(Context context)
Returns whether the annotation list should display the annotation's author.
static int getAnnotListSortOrder(Context context, BaseAnnotationSortOrder defaultSortOrder)
Get the value saved in shared preferences.
static String getAnnotStylePreset(Context context, int annotType, int presetIndex)
Gets annotation style preset by given tool mode and preset index
static String getAnnotToolbarVisibleAnnotTypes(Context context)
Gets visible annotation types in annotation toolbar
static boolean getAppUpdated(Context context)
Returns whether the app gets updated.
static String getAppVersionName(Context context)
Returns the app version name.
static String getAuthorName(Context context)
Returns the author's name.
static boolean getAuthorNameHasBeenAsked(Context context)
Returns whether the author's name has been asked before.
static int getColorMode(Context context)
Returns the color mode.
static String getColorModePresets(Context context)
Gets color mode presets
static int getColorPickerPage(Context context)
Gets color picker current page
static boolean getContinuousAnnotationEdit(Context context)
Returns whether the continuous annotation edit mode is enabled.
static boolean getCopyAnnotatedTextToNote(Context context)
Returns whether the text of a text markup annotation should be automatically copied into the annotation's note.
static boolean getCopyAnnotatedTextToNote(Context context, boolean defaultValue)
Returns whether the text of a text markup annotation should be automatically copied into the annotation's note.
static int getCustomColorModeBGColor(Context context)
Gets custom color mode background color
static int getCustomColorModeTextColor(Context context)
Gets custom color mode text color
static SharedPreferences getDefaultSharedPreferences(Context context)
Gets default shared preference
static boolean getDoubleRowToolbarInUse(Context context)
Returns whether double row toolbar is in use
static boolean getEnableJavaScript(Context context)
Returns whether JavaScript actions embedded in PDF files should be executed.
static String getFavoriteColors(Context context)
Gets a set of recent used colors string
static boolean getFileFilter(Context context, int fileType, String suffix)
Gets whether filtering files.
static Set<String> getFreeTextFonts(Context context)
Returns available fonts for free text annotations.
static boolean getFullScreenMode(Context context)
Returns whether the full screen mode is enabled.
static int getGridSize(Context context, String suffix)
Gets Grid size.
static boolean getImageSmoothing(Context context)
Returns whether the image smoothing mode is enabled.
static boolean getInkSmoothing(Context context)
Returns whether ink drawn with a finger should be smoothed.
static boolean getInkSmoothing(Context context, boolean defaultValue)
Returns whether ink drawn with a finger should be smoothed.
static int getLinkEditLastOption(Context context)
get edit link dialog last option
static String getLocalAppVersion(Context context)
Returns the local app version.
static String getLocalFolderPath(Context context)
gets local folder path
static String getLocalFolderTree(Context context)
Gets local folder tree path
static boolean getMaintainZoomOption(Context context)
Returns whether the maintain zoom level mode is enabled.
static boolean getMultipleTabs(Context context)
Returns whether the multiple tabs mode is enabled.
static String getOpenUrlAsyncCache(Context context)
Gets the open url last viewed page cache
static boolean getPageNumberOverlayOption(Context context)
Returns whether the page number should be shown when turning pages.
static PDFViewCtrl.PageViewMode getPageViewMode(Context context)
Returns page view mode value
static String getRecentColors(Context context)
Gets a set of recent used colors string
static boolean getRememberLastPage(Context context)
Returns whether documents opened from the recent list should be reopened on the last page they were on.
static String getSavedExternalFolderTreeUri(Context context)
Gets saved external folder tree uri
static String getSavedExternalFolderUri(Context context)
Gets saved external folder Uri
static int getSavedFilePickerFileType(Context context)
Gets saved file picker file type
static String getSavedFilePickerLocation(Context context)
Gets saved file picker location
static int getSavedFolderPickerFileType(Context context)
Gets saved folder picker location
static String getSavedFolderPickerLocation(Context context)
Gets saved folder picker location
static boolean getScreenStayLock(Context context)
Returns whether the screen sleep lock mode is enabled.
static int getSelectedColorModePreset(Context context)
Gets selected color mode presets
static boolean getShowAnnotationIndicator(Context context, boolean defaultValue)
Returns whether annotation note indicator should be displayed retrieved from shared preferences, returns default value if not in shared preferences.
static boolean getShowOpenReadOnlySdCardFileWarning(Context context)
Gets whether it shows open read only sd card file warning dialog,
static boolean getShowRageScrollingInfo(Context context)
Gets whether to show rage scroll dialog
static String getSortMode(Context context)
Gets sort mode
static boolean getStoragePermissionDenied(Context context)
Returns whether storage permission has been denied
static boolean getStoragePermissionHasBeenAsked(Context context)
Returns whether storage permission request has been asked before.
static boolean getStylusAsPen(Context context)
Returns whether a stylus should act as a pen tool instead of a finger when touching the viewer.
static boolean getStylusAsPen(Context context, boolean defaultValue)
Returns whether a stylus should act as a pen tool instead of a finger when touching the viewer.
static boolean getUnlimitedTabsEnabled(Context context, boolean defaultValue)
Returns whether the number of tabs should be unlimited retrieved from shared preferences, returns default value if not in shared preferences.
static String getViewMode(Context context)
Gets the view mode.
static boolean hasRtlModeOption(Context context)
Returns whether the viewer's page display dialog should include an option to enable right-to-left document support.
static boolean isAutoSelectAnnotation(Context context, boolean defaultValue)
Returns whether the show quick menu mode is enabled.
static boolean isAutoSelectAnnotation(Context context)
Returns whether the show quick menu mode is enabled.
static boolean isDarkMode(Context context)
Whether it is in dark mode
static boolean isDesktopUI(Context context)
Returns whether the desktop UI mode is enabled.
static boolean isPrintAnnotationsMode(Context context)
Returns whether annotation should be printed along with the document.
static boolean isPrintDocumentMode(Context context)
Returns whether document itself should be printed.
static boolean isPrintSummaryMode(Context context)
Returns whether summary of annotations should be printed.
static boolean isVerticalScrollSnap(Context context)
Returns whether the vertical scrolling will snap to page is enabled.
static void setAnnotListShowAuthor(Context context, boolean showAuthor)
Sets whether the annotation list should display the annotation's author.
static void setAnnotStylePreset(Context context, int annotType, int presetIndex, String annotStyleJSON)
Sets annotation style preset
static void setAnnotToolbarVisibleAnnotTypes(Context context, String visibleAnnotTypes)
Sets visible annotation types in annotation toolbar
static void setAuthorNameHasBeenAsked(Context context)
Sets that the author's name has been asked before.
static void setColorMode(Context context, int mode)
Sets the color mode in the shared preferences.
static void setColorModePresets(Context context, String jsonSerializedArray)
Sets color mode presets
static void setColorPickerPage(Context context, int page)
Sets color picker current page
static void setContinuousAnnotationEdit(Context context, boolean value)
Sets whether the continuous annotation edit mode is enabled.
static void setCustomColorModeBGColor(Context context, int color)
Sets custom color mode background color
static void setCustomColorModeTextColor(Context context, int color)
Sets custom color mode text color
static void setEnableJavaScript(Context context, boolean value)
Sets whether JavaScript actions embedded in PDF files should be executed.
static void setFavoriteColors(Context context, String colors)
Sets recently used colors
static void setFullScreenMode(Context context, boolean enabled)
Sets whether the full screen mode is enabled.
static void setLinkEditLastOption(Context context, int option)
set edit link dialog last option
static void setMultipleTabs(Context context, boolean enabled)
Sets whether the multiple tabs mode is enabled.
static void setOpenUrlAsyncCache(Context context, String jsonString)
Sets the open url last viewed page cache
static void setPageViewMode(Context context, PDFViewCtrl.PageViewMode value)
Sets page view mode value
static void setPrintAnnotationsMode(Context context, boolean enabled)
Sets whether annotation should be printed in the shared preferences.
static void setPrintDocumentMode(Context context, boolean enabled)
Sets whether document itself should be printed in the shared preferences.
static void setPrintSummaryMode(Context context, boolean enabled)
Sets whether summary of annotations should be printed in the shared preferences.
static void setRecentColors(Context context, String colors)
Sets recently used colors
static void setSelectedColorModePreset(Context context, int position)
Sets selected color mode preset
static void setVerticalScrollSnap(Context context, boolean enabled)
Sets whether the vertical scrolling will snap to page is enabled.
static boolean shouldShowHowToPaste(Context context)
Returns whether should teach the user how to paste.
static void updateAnnotListSortOrder(Context context, BaseAnnotationSortOrder sortOrder)
Updates sort order for annotation list
static void updateAuthorName(Context context, String value)
Updates the author's name.
static void updateDoubleRowToolbarInUse(Context context, boolean value)
Updates whether double row toolbar is in use
static void updateFileFilter(Context context, int fileType, String suffix, boolean visibility)
Updates file filter
static void updateGridSize(Context context, String suffix, int size)
Updates grid size
static void updateLocalAppVersion(Context context)
Updates the local app version in the shared preferences.
static void updateLocalFolderPath(Context context, String path)
Updates local folder path
static void updateLocalFolderTree(Context context, String path)
Updates local folder tree
static void updateRtlModeOption(Context context, boolean rtlModeOption)
Updates the right-to-left mode option in the shared preferences.
static void updateSavedExternalFolderTreeUri(Context context, String uri)
Updates saved external folder tree uri
static void updateSavedExternalFolderUri(Context context, String uri)
Updates Saved external folder uri
static void updateSavedFilePickerFileType(Context context, int fileType)
Update saved file picker file type
static void updateSavedFilePickerLocation(Context context, String location)
Updates saved file picker locaiton
static void updateSavedFolderPickerFileType(Context context, int fileType)
Updates saved folder picker file type
static void updateSavedFolderPickerLocation(Context context, String location)
Updates saved folder picker location
static void updateShowOpenReadOnlySdCardFileWarning(Context context, boolean val)
Updates show open read only SD card file warning dialog
static void updateShowRageScrollingInfo(Context context, boolean value)
Sets whether to show rage scroll dialog
static void updateSortMode(Context context, String mode)
Updates sort mode
static void updateStoragePermissionDenied(Context context, boolean value)
Updates whether storage permission has been denied.
static void updateStoragePermissionHasBeenAsked(Context context, boolean value)
Updates whether storage permission request has been asked before
static void updateStylusAsPen(Context context, boolean enable)
Sets whether a stylus should act as a pen tool instead of a finger when touching the viewer.
static void updateViewMode(Context context, String mode)
Update the view mode in the shared preferences.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final boolean KEY_PREF_SHOW_RAGE_SCROLLING_INFO_DEFAULT_VALUE

Constant Value: true

public static final boolean KEY_PREF_VERTICAL_SCROLL_SNAP_DEFAULT_VALUE

Constant Value: false

public static final String KEY_PREF_VIEWMODE_CONTINUOUS_VALUE

View mode key: continuous mode

Constant Value: "continuous"

public static final String KEY_PREF_VIEWMODE_FACINGCOVER_CONT_VALUE

View mode key: facing cover continuous mode

Constant Value: "facingcover_cont"

public static final String KEY_PREF_VIEWMODE_FACINGCOVER_VALUE

View mode key: facing cover page mode

Constant Value: "facingcover"

public static final String KEY_PREF_VIEWMODE_FACING_CONT_VALUE

View mode key: facing continuous mode

Constant Value: "facing_cont"

public static final String KEY_PREF_VIEWMODE_FACING_VALUE

View mode key: facing page mode

Constant Value: "facing"

public static final String KEY_PREF_VIEWMODE_ROTATION_VALUE

View mode key: rotation mode

Constant Value: "rotation"

public static final String KEY_PREF_VIEWMODE_SINGLEPAGE_VALUE

View mode key: single page mode

Constant Value: "singlepage"

public static final String KEY_PREF_VIEWMODE_THUMBNAILS_VALUE

View mode key: thumbnails mode

Constant Value: "thumbnails"

public static final String KEY_PREF_VIEWMODE_USERCROP_VALUE

View mode key: user crop mode

Constant Value: "user_crop"

Public Constructors

public PdfViewCtrlSettingsManager ()

Public Methods

public static boolean getAllowPageChangeAnimation (Context context)

Returns whether page should turn with animation when tapping on the left of right edge of the viewer.

Parameters
context The context
Returns
  • True if the turn page with animation mode is enabled

public static boolean getAllowPageChangeOnTap (Context context)

Returns whether page should turn when tapping on the left of right edge of the viewer.

Parameters
context The context
Returns
  • True if the turn page on tap mode is enabled

public static boolean getAnnotListShowAuthor (Context context)

Returns whether the annotation list should display the annotation's author.

Parameters
context The context
Returns
  • True if the annotation list shows author mode is enabled

public static int getAnnotListSortOrder (Context context, BaseAnnotationSortOrder defaultSortOrder)

Get the value saved in shared preferences.

Parameters
context the context to get shared preferences
Returns

public static String getAnnotStylePreset (Context context, int annotType, int presetIndex)

Gets annotation style preset by given tool mode and preset index

Parameters
context the context
annotType tool mode
presetIndex preset index
Returns
  • annotaiton style preset in JSON string format

public static String getAnnotToolbarVisibleAnnotTypes (Context context)

Gets visible annotation types in annotation toolbar

Parameters
context The context
Returns
  • visible annotation types

public static boolean getAppUpdated (Context context)

Returns whether the app gets updated.

Parameters
context The context
Returns
  • True if the app gets updated

public static String getAppVersionName (Context context)

Returns the app version name.

Parameters
context The context
Returns
  • The app version name

public static String getAuthorName (Context context)

Returns the author's name.

Parameters
context The context
Returns
  • The author's name

public static boolean getAuthorNameHasBeenAsked (Context context)

Returns whether the author's name has been asked before.

Parameters
context The context
Returns
  • True if the author's name has been asked before

public static int getColorMode (Context context)

Returns the color mode. Possible values are #KEY_PREF_COLOR_MODE_NORMAL, #KEY_PREF_COLOR_MODE_SEPIA and #KEY_PREF_COLOR_MODE_NIGHT.

Parameters
context The context
Returns
  • The color mode

public static String getColorModePresets (Context context)

Gets color mode presets

Parameters
context The context
Returns
  • Color mode presets

public static int getColorPickerPage (Context context)

Gets color picker current page

Parameters
context The context
Returns
  • The stored page

public static boolean getContinuousAnnotationEdit (Context context)

Returns whether the continuous annotation edit mode is enabled.

Parameters
context The context
Returns
  • True if the continuous annotation edit mode is enabled

public static boolean getCopyAnnotatedTextToNote (Context context)

Returns whether the text of a text markup annotation should be automatically copied into the annotation's note.

Parameters
context The context
Returns
  • True if the copy annotated text to note mode is enabled

public static boolean getCopyAnnotatedTextToNote (Context context, boolean defaultValue)

Returns whether the text of a text markup annotation should be automatically copied into the annotation's note.

Parameters
context The context
defaultValue The default value
Returns
  • True if the copy annotated text to note mode is enabled

public static int getCustomColorModeBGColor (Context context)

Gets custom color mode background color

Parameters
context The context
Returns
  • The custom color mode background color

public static int getCustomColorModeTextColor (Context context)

Gets custom color mode text color

Parameters
context The context
Returns
  • The text color

public static SharedPreferences getDefaultSharedPreferences (Context context)

Gets default shared preference

Parameters
context The context
Returns
  • Default shared preference

public static boolean getDoubleRowToolbarInUse (Context context)

Returns whether double row toolbar is in use

Parameters
context The context
Returns
  • True if double row toolbar is in use

public static boolean getEnableJavaScript (Context context)

Returns whether JavaScript actions embedded in PDF files should be executed.

Parameters
context The context
Returns
  • True if the javascript mode is enabled

public static String getFavoriteColors (Context context)

Gets a set of recent used colors string

Parameters
context the context
Returns
  • a set of recently used colors

public static boolean getFileFilter (Context context, int fileType, String suffix)

Gets whether filtering files.

Parameters
context The context
fileType The file type
suffix The suffix for filtering file.
Returns
  • true then filter files, false otherwise

public static Set<String> getFreeTextFonts (Context context)

Returns available fonts for free text annotations.

Parameters
context The context
Returns
  • available fonts for free text annotations

public static boolean getFullScreenMode (Context context)

Returns whether the full screen mode is enabled.

Parameters
context The context
Returns
  • True if the full screen mode is enabled

public static int getGridSize (Context context, String suffix)

Gets Grid size.

Parameters
context The context
suffix The suffix
Returns
  • Grid size

public static boolean getImageSmoothing (Context context)

Returns whether the image smoothing mode is enabled.

Parameters
context The context
Returns
  • True if the image smoothing mode is enabled

public static boolean getInkSmoothing (Context context)

Returns whether ink drawn with a finger should be smoothed.

Parameters
context The context
Returns
  • True if the ink smoothing mode is enabled

public static boolean getInkSmoothing (Context context, boolean defaultValue)

Returns whether ink drawn with a finger should be smoothed.

Parameters
context The context
defaultValue The default value
Returns
  • True if the ink smoothing mode is enabled

public static int getLinkEditLastOption (Context context)

get edit link dialog last option

Parameters
context the context
Returns
  • edit link dialog last selected option

public static String getLocalAppVersion (Context context)

Returns the local app version.

Parameters
context The context
Returns
  • The local app version

public static String getLocalFolderPath (Context context)

gets local folder path

Parameters
context The context
Returns
  • Local folder path

public static String getLocalFolderTree (Context context)

Gets local folder tree path

Parameters
context The context
Returns
  • Local folder tree path

public static boolean getMaintainZoomOption (Context context)

Returns whether the maintain zoom level mode is enabled.

Parameters
context The context
Returns
  • True if the maintain zoom level mode is enabled

public static boolean getMultipleTabs (Context context)

Returns whether the multiple tabs mode is enabled.

Parameters
context The context
Returns
  • True if the multiple tabs mode is enabled

public static String getOpenUrlAsyncCache (Context context)

Gets the open url last viewed page cache

Parameters
context the context
Returns
  • the cache json string

public static boolean getPageNumberOverlayOption (Context context)

Returns whether the page number should be shown when turning pages.

Parameters
context The context
Returns
  • True if the page number should be shown when turning pages

public static PDFViewCtrl.PageViewMode getPageViewMode (Context context)

Returns page view mode value

Parameters
context The context
Returns

public static String getRecentColors (Context context)

Gets a set of recent used colors string

Parameters
context the context
Returns
  • a set of recently used colors

public static boolean getRememberLastPage (Context context)

Returns whether documents opened from the recent list should be reopened on the last page they were on.

Parameters
context The context
Returns
  • True if the remember last page mode is enabled

public static String getSavedExternalFolderTreeUri (Context context)

Gets saved external folder tree uri

Parameters
context The context
Returns
  • eExternal folder tree uri

public static String getSavedExternalFolderUri (Context context)

Gets saved external folder Uri

Parameters
context The context
Returns
  • Saved external folder Uri

public static int getSavedFilePickerFileType (Context context)

Gets saved file picker file type

Parameters
context The context
Returns
  • The savedd file picker file type

public static String getSavedFilePickerLocation (Context context)

Gets saved file picker location

Parameters
context The context
Returns
  • The file picker locaiton

public static int getSavedFolderPickerFileType (Context context)

Gets saved folder picker location

Parameters
context The context
Returns
  • The location

public static String getSavedFolderPickerLocation (Context context)

Gets saved folder picker location

Parameters
context The context
Returns
  • The saved folder picker lcoation

public static boolean getScreenStayLock (Context context)

Returns whether the screen sleep lock mode is enabled.

Parameters
context The context
Returns
  • True if the screen sleep lock mode is enabled

public static int getSelectedColorModePreset (Context context)

Gets selected color mode presets

Parameters
context The context
Returns
  • Selected color mode presets

public static boolean getShowAnnotationIndicator (Context context, boolean defaultValue)

Returns whether annotation note indicator should be displayed retrieved from shared preferences, returns default value if not in shared preferences.

Parameters
context The context
defaultValue default value to return if not set in shared preferences
Returns
  • True if annotation note indicator is should be displayed.

public static boolean getShowOpenReadOnlySdCardFileWarning (Context context)

Gets whether it shows open read only sd card file warning dialog,

Parameters
context The context
Returns
  • Show open read only sd card file warning dialog

public static boolean getShowRageScrollingInfo (Context context)

Gets whether to show rage scroll dialog

public static String getSortMode (Context context)

Gets sort mode

Parameters
context The context
Returns
  • Sort mode

public static boolean getStoragePermissionDenied (Context context)

Returns whether storage permission has been denied

Parameters
context The context
Returns
  • True if storage permission has been denied

public static boolean getStoragePermissionHasBeenAsked (Context context)

Returns whether storage permission request has been asked before.

Parameters
context The context
Returns
  • True if storage permission request has been asked before

public static boolean getStylusAsPen (Context context)

Returns whether a stylus should act as a pen tool instead of a finger when touching the viewer.

Parameters
context The context
Returns
  • True if the stylus as pen mode is enabled

public static boolean getStylusAsPen (Context context, boolean defaultValue)

Returns whether a stylus should act as a pen tool instead of a finger when touching the viewer.

Parameters
context The context
defaultValue The default value
Returns
  • True if the stylus as pen mode is enabled

public static boolean getUnlimitedTabsEnabled (Context context, boolean defaultValue)

Returns whether the number of tabs should be unlimited retrieved from shared preferences, returns default value if not in shared preferences. This will be ignored if maximumTabCount(int) is used when initializing the document viewer.

Parameters
context The context
defaultValue default value to return if not set in shared preferences
Returns
  • True if unlimited tabs is enabled

public static String getViewMode (Context context)

Gets the view mode. Possible values are KEY_PREF_VIEWMODE_CONTINUOUS_VALUE and KEY_PREF_VIEWMODE_SINGLEPAGE_VALUE.

Parameters
context the Context
Returns
  • the view mode

public static boolean hasRtlModeOption (Context context)

Returns whether the viewer's page display dialog should include an option to enable right-to-left document support.

Parameters
context The context
Returns
  • True if the right-to-left mode option is enabled

public static boolean isAutoSelectAnnotation (Context context, boolean defaultValue)

Returns whether the show quick menu mode is enabled.

Parameters
context The context
defaultValue The default value
Returns
  • True if the show quick menu mode is enabled

public static boolean isAutoSelectAnnotation (Context context)

Returns whether the show quick menu mode is enabled.

Parameters
context The context
Returns
  • True if the show quick menu mode is enabled

public static boolean isDarkMode (Context context)

Whether it is in dark mode

Parameters
context The context
Returns
  • true then dark mode, false otherwise

public static boolean isDesktopUI (Context context)

Returns whether the desktop UI mode is enabled.

Parameters
context The context
Returns
  • True if the desktop UI mode is enabled

public static boolean isPrintAnnotationsMode (Context context)

Returns whether annotation should be printed along with the document.

Parameters
context The context
Returns
  • True if annotation should be printed

public static boolean isPrintDocumentMode (Context context)

Returns whether document itself should be printed.

Parameters
context The context
Returns
  • True if document itself should be printed

public static boolean isPrintSummaryMode (Context context)

Returns whether summary of annotations should be printed.

Parameters
context The context
Returns
  • True if summary of annotations should be printed

public static boolean isVerticalScrollSnap (Context context)

Returns whether the vertical scrolling will snap to page is enabled.

Parameters
context The context
Returns
  • True if the vertical scrolling will snap to page is enabled

public static void setAnnotListShowAuthor (Context context, boolean showAuthor)

Sets whether the annotation list should display the annotation's author.

Parameters
context The context
showAuthor Whether the annotation list shows author

public static void setAnnotStylePreset (Context context, int annotType, int presetIndex, String annotStyleJSON)

Sets annotation style preset

Parameters
context the context
annotType tool mode
presetIndex preset index
annotStyleJSON annotation style in JSON string format

public static void setAnnotToolbarVisibleAnnotTypes (Context context, String visibleAnnotTypes)

Sets visible annotation types in annotation toolbar

Parameters
context The context

public static void setAuthorNameHasBeenAsked (Context context)

Sets that the author's name has been asked before.

Parameters
context The context

public static void setColorMode (Context context, int mode)

Sets the color mode in the shared preferences.

Parameters
context The context
mode The color mode. Possible values are #KEY_PREF_COLOR_MODE_NORMAL, #KEY_PREF_COLOR_MODE_SEPIA and #KEY_PREF_COLOR_MODE_NIGHT

public static void setColorModePresets (Context context, String jsonSerializedArray)

Sets color mode presets

Parameters
context The context
jsonSerializedArray Json Serialized array of color mode presets

public static void setColorPickerPage (Context context, int page)

Sets color picker current page

Parameters
context The context
page The current page

public static void setContinuousAnnotationEdit (Context context, boolean value)

Sets whether the continuous annotation edit mode is enabled.

Parameters
context The context
value Whether the continuous annotation edit mode is enabled

public static void setCustomColorModeBGColor (Context context, int color)

Sets custom color mode background color

Parameters
context The context
color Background color

public static void setCustomColorModeTextColor (Context context, int color)

Sets custom color mode text color

Parameters
context The context
color text color

public static void setEnableJavaScript (Context context, boolean value)

Sets whether JavaScript actions embedded in PDF files should be executed.

Parameters
context The context
value Whether the javascript mode is enabled

public static void setFavoriteColors (Context context, String colors)

Sets recently used colors

Parameters
context the context
colors colors

public static void setFullScreenMode (Context context, boolean enabled)

Sets whether the full screen mode is enabled.

Parameters
context The context
enabled True if the full screen mode is enabled

public static void setLinkEditLastOption (Context context, int option)

set edit link dialog last option

Parameters
context the context
option last selected option

public static void setMultipleTabs (Context context, boolean enabled)

Sets whether the multiple tabs mode is enabled.

Parameters
context The context
enabled True if the multiple tabs mode is enabled

public static void setOpenUrlAsyncCache (Context context, String jsonString)

Sets the open url last viewed page cache

Parameters
context the context
jsonString the cache json string

public static void setPageViewMode (Context context, PDFViewCtrl.PageViewMode value)

Sets page view mode value

Parameters
context The context
value The page view mode value

public static void setPrintAnnotationsMode (Context context, boolean enabled)

Sets whether annotation should be printed in the shared preferences.

Parameters
context The context
enabled True if annotation should be printed

public static void setPrintDocumentMode (Context context, boolean enabled)

Sets whether document itself should be printed in the shared preferences.

Parameters
context The context
enabled True if document itself should be printed

public static void setPrintSummaryMode (Context context, boolean enabled)

Sets whether summary of annotations should be printed in the shared preferences.

Parameters
context The context
enabled True if summary of annotations should be printed

public static void setRecentColors (Context context, String colors)

Sets recently used colors

Parameters
context the context
colors colors

public static void setSelectedColorModePreset (Context context, int position)

Sets selected color mode preset

Parameters
context The context
position position of color mode

public static void setVerticalScrollSnap (Context context, boolean enabled)

Sets whether the vertical scrolling will snap to page is enabled.

Parameters
context The context
enabled True if the vertical scrolling will snap to page is enabled

public static boolean shouldShowHowToPaste (Context context)

Returns whether should teach the user how to paste.

Parameters
context The context
Returns
  • True if should teach the user how to paste

public static void updateAnnotListSortOrder (Context context, BaseAnnotationSortOrder sortOrder)

Updates sort order for annotation list

Parameters
context context to save shared preferences
sortOrder AnnotationListSortOrder

public static void updateAuthorName (Context context, String value)

Updates the author's name.

Parameters
context The context
value The author's name

public static void updateDoubleRowToolbarInUse (Context context, boolean value)

Updates whether double row toolbar is in use

Parameters
context The context
value True if double row toolbar is in use

public static void updateFileFilter (Context context, int fileType, String suffix, boolean visibility)

Updates file filter

Parameters
context The context
fileType The file type
suffix The suffix
visibility The visibility of the file

public static void updateGridSize (Context context, String suffix, int size)

Updates grid size

Parameters
context The context
suffix The suffix
size The grid size

public static void updateLocalAppVersion (Context context)

Updates the local app version in the shared preferences.

Parameters
context The context

public static void updateLocalFolderPath (Context context, String path)

Updates local folder path

Parameters
context The context
path The local folder path

public static void updateLocalFolderTree (Context context, String path)

Updates local folder tree

Parameters
context The context
path Local folder tree path

public static void updateRtlModeOption (Context context, boolean rtlModeOption)

Updates the right-to-left mode option in the shared preferences.

Parameters
context The context
rtlModeOption The right-to-left mode option

public static void updateSavedExternalFolderTreeUri (Context context, String uri)

Updates saved external folder tree uri

Parameters
context The context
uri The uri

public static void updateSavedExternalFolderUri (Context context, String uri)

Updates Saved external folder uri

Parameters
context The context
uri The uri

public static void updateSavedFilePickerFileType (Context context, int fileType)

Update saved file picker file type

Parameters
context The context
fileType Saved file picker file type

public static void updateSavedFilePickerLocation (Context context, String location)

Updates saved file picker locaiton

Parameters
context The context
location The location

public static void updateSavedFolderPickerFileType (Context context, int fileType)

Updates saved folder picker file type

Parameters
context The context
fileType The file type

public static void updateSavedFolderPickerLocation (Context context, String location)

Updates saved folder picker location

Parameters
context The context
location The location

public static void updateShowOpenReadOnlySdCardFileWarning (Context context, boolean val)

Updates show open read only SD card file warning dialog

Parameters
context The context
val whether it shows warning dialog

public static void updateShowRageScrollingInfo (Context context, boolean value)

Sets whether to show rage scroll dialog

public static void updateSortMode (Context context, String mode)

Updates sort mode

Parameters
context The context
mode The sort mode

public static void updateStoragePermissionDenied (Context context, boolean value)

Updates whether storage permission has been denied.

Parameters
context The context
value True if storage permission has been denied

public static void updateStoragePermissionHasBeenAsked (Context context, boolean value)

Updates whether storage permission request has been asked before

Parameters
context The context
value True if storage permission request has been asked before

public static void updateStylusAsPen (Context context, boolean enable)

Sets whether a stylus should act as a pen tool instead of a finger when touching the viewer.

Parameters
context The context
enable True if the stylus as pen mode is enabled

public static void updateViewMode (Context context, String mode)

Update the view mode in the shared preferences.

Parameters
context the Context
mode the view mode. Possible values are KEY_PREF_VIEWMODE_CONTINUOUS_VALUE and KEY_PREF_VIEWMODE_SINGLEPAGE_VALUE.