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
String KEY_PREF_COLOR_MANAGEMENT
String KEY_PREF_EDIT_URI_BACKUP_FILE_PATH
String KEY_PREF_EDIT_URI_BACKUP_FILE_PATH_DEFAULT_VALUE
String KEY_PREF_PAGE_VIEW_MODE
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_READING_SETTINGS_VALUE View mode key: reading settings 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
Fields
public static String sCustomSharedPreferencesName
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 the 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, String suffix)
Gets annotation style preset by given tool mode and preset index
static String getAnnotStylePreset(Context context, int annotType, int presetIndex)
Gets annotation style preset by given tool mode and preset index
static int getAnnotStylesMoreAnnotType(Context context, int annotType, int presetIndex, String suffix, int defaultValue)
Gets annotation preset style picker more annot type selected type
static int getAnnotStylesTabIndex(Context context, int annotType, int presetIndex, String suffix)
Gets annotation preset style picker tab index
static String getAnnotToolbarVisibleAnnotTypes(Context context)
Gets visible annotation types in annotation toolbar
static PdfViewCtrlTabHostFragment2.AnnotationToolbarPosition getAnnotationToolbarPosition(Context context, PdfViewCtrlTabHostFragment2.AnnotationToolbarPosition defaultValue)
Gets annotation toolbar position in the viewer, default to TOP
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 String getBackupCacheFolderTree(Context context)
Gets backup folder tree path
static String getBackupFolderPath(Context context)
gets backup folder path
static boolean getColorManagement(Context context)
Returns whether the color management is enabled.
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 ToolManager.ToolMode getDefaultStylusToolMode(Context context)
Gets default stylus tool mode from shared preferences
static boolean getDoubleRowToolbarInUse(Context context)
Returns whether double row toolbar is in use
static boolean getDrawWithFinger(Context context)
Gets draw with finger mode from shared preferences
static String getEditUriBackupFilePath(Context context)
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 boolean getFollowSystemDarkMode(Context context)
Gets whether to follow the system setting for dark mode
static boolean getFreeHighlighterSmoothing(Context context)
Returns whether free highlighter should be auto-smoothed.
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 getInRTLMode(Context context)
Get whether the viewer should be in RTL mode.
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 String getOpenUrlPageStateAsyncCache(Context context)
Gets the open url last viewed zoom, h pos, v pos, rotation 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 boolean getQuickBookmarkCreation(Context context)
Returns whether quick bookmark creation is enabled in the viewer.
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 String getSavedHomeToolbarMenu(Context context)
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 getShowAnnotationIndicator(Context context)
Returns whether annotation note indicator should be displayed retrieved from shared preferences, returns default value if not in shared preferences.
static boolean getShowNavigationBarForNewUI(Context context)
Returns whether the system navigation bar is visible in the new UI.
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 boolean getShowScrollbarGuideline(Context context)
Returns whether the scrollbar guideline should be shown with the scrollbar.
static boolean getShowStatusBarForNewUI(Context context)
Returns whether the system status bar is visible in the new UI.
static boolean getShowTabBarForNewUI(Context context)
Returns whether the tab bar is visible in the new UI for tablets.
static boolean getShowTabBarForPhone(Context context)
Returns whether the tab bar is visible in the new UI for phones.
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 int getThumbListFilterMode(Context context, int defaultMode)
Gets filter mode for thumbnails view
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 setAllowPageChangeOnTap(Context context, boolean changePage)
Sets whether the page should turn when tapping on the left of right edge of the viewer.
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 suffix, String annotStyleJSON)
Sets annotation style preset
static void setAnnotStylePreset(Context context, int annotType, int presetIndex, String annotStyleJSON)
Sets annotation style preset
static void setAnnotStylesMoreAnnotType(Context context, int annotType, int presetIndex, String suffix, int moreAnnotType)
Sets annotation preset style picker more annot type selected type
static void setAnnotStylesTabIndex(Context context, int annotType, int presetIndex, String suffix, int tabIndex)
Sets annotation preset style picker tab index
static void setAnnotToolbarVisibleAnnotTypes(Context context, String visibleAnnotTypes)
Sets visible annotation types in annotation toolbar
static void setAnnotationToolbarPosition(Context context, PdfViewCtrlTabHostFragment2.AnnotationToolbarPosition annotationToolbarPosition)
Sets annotation toolbar position in the viewer
static void setAuthorNameHasBeenAsked(Context context)
Sets that the author's name has been asked before.
static void setAutoSelectAnnotation(Context context, boolean value)
Sets whether the show quick menu mode is enabled.
static void setColorManagement(Context context, boolean enabled)
Sets whether the color management is enabled.
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 setCopyAnnotatedTextToNote(Context context, boolean value)
Sets whether the text of a text markup annotation should be automatically copied into the annotation's note.
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 setDefaultStylusToolMode(Context context, ToolManager.ToolMode mode)
Sets the default stylus tool mode in the shared preferences.
static void setDrawWithFinger(Context context, boolean drawWithFinger)
Sets whether the finger should draw when stylus as pen is enabled in the shared preferences.
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 setFollowSystemDarkMode(Context context, boolean followSystem)
Sets whether to follow the system setting for dark mode
static void setFreeTextFonts(Context context, Set<String> value)
Sets available fonts for free text annotations.
static void setFullScreenMode(Context context, boolean enabled)
Sets whether the full screen mode is enabled.
static void setInkSmoothing(Context context, boolean value)
Sets whether ink drawn with a finger should be smoothed.
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 setOpenUrlPageStateAsyncCache(Context context, String jsonString)
Sets the open url last viewed zoom, h pos, v pos, rotation 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 setSavedHomeToolbarMenu(Context context, String toolbarMenu)
static void setSelectedColorModePreset(Context context, int position)
Sets selected color mode preset
static void setShowAnnotationIndicator(Context context, boolean value)
Sets whether annotation note indicator should be displayed retrieved from shared preferences, returns default value if not in shared preferences.
static void setShowNavigationBarForNewUI(Context context, boolean show)
Sets whether the system navigation bar is visible in the new UI.
static void setShowScrollbarGuideline(Context context, boolean showGuideline)
Sets whether the scrollbar guideline should be shown with the scrollbar.
static void setShowStatusBarForNewUI(Context context, boolean show)
Sets whether the system status bar is visible in the new UI.
static void setShowTabBarForNewUI(Context context, boolean show)
Sets whether the tab bar is visible in the new UI for tablets.
static void setShowTabBarForPhone(Context context, boolean show)
Sets whether the tab bar is visible in the new UI for phones.
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 updateBackupCacheFolderPath(Context context, String path)
Updates backup folder path
static void updateBackupCacheFolderTree(Context context, String path)
Updates backup folder tree
static void updateDoubleRowToolbarInUse(Context context, boolean value)
Updates whether double row toolbar is in use
static void updateEditUriBackupFilePath(Context context, String filepath)
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 updateInRTLMode(Context context, boolean isRTL)
Update whether the viewer should be in RTL mode.
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 updateThumbListFilterMode(Context context, int mode)
Sets filter mode for thumbnails view
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 String KEY_PREF_COLOR_MANAGEMENT

Constant Value: "pref_color_management"

public static final String KEY_PREF_EDIT_URI_BACKUP_FILE_PATH

Constant Value: "pref_edit_uri_backup_file_path"

public static final String KEY_PREF_EDIT_URI_BACKUP_FILE_PATH_DEFAULT_VALUE

Constant Value: ""

public static final String KEY_PREF_PAGE_VIEW_MODE

Constant Value: "pref_page_view_mode"

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_READING_SETTINGS_VALUE

View mode key: reading settings mode

Constant Value: "reading_settings"

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"

Fields

public static String sCustomSharedPreferencesName

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 the 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, String suffix)

Gets annotation style preset by given tool mode and preset index

Parameters
context the context
annotType annotation type
presetIndex preset index
suffix suffix string to uniquely identify this annot style
Returns
  • annotaiton style preset in JSON string format

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 annotation type
presetIndex preset index
Returns
  • annotaiton style preset in JSON string format

public static int getAnnotStylesMoreAnnotType (Context context, int annotType, int presetIndex, String suffix, int defaultValue)

Gets annotation preset style picker more annot type selected type

Parameters
context the context
annotType annotation type
presetIndex preset index
suffix suffix string to uniquely identify this annot style
Returns
  • more annot type selected

public static int getAnnotStylesTabIndex (Context context, int annotType, int presetIndex, String suffix)

Gets annotation preset style picker tab index

Parameters
context the context
annotType annotation type
presetIndex preset index
suffix suffix string to uniquely identify this annot style
Returns
  • the tab index

public static String getAnnotToolbarVisibleAnnotTypes (Context context)

Gets visible annotation types in annotation toolbar

Parameters
context The context
Returns
  • visible annotation types

public static PdfViewCtrlTabHostFragment2.AnnotationToolbarPosition getAnnotationToolbarPosition (Context context, PdfViewCtrlTabHostFragment2.AnnotationToolbarPosition defaultValue)

Gets annotation toolbar position in the viewer, default to TOP

Parameters
context The context
Returns
  • annotation toolbar position

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 String getBackupCacheFolderTree (Context context)

Gets backup folder tree path

Parameters
context The context
Returns
  • backup folder tree path

public static String getBackupFolderPath (Context context)

gets backup folder path

Parameters
context The context
Returns
  • backup folder path

public static boolean getColorManagement (Context context)

Returns whether the color management is enabled.

Parameters
context The context
Returns
  • True if the color management is enabled

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 ToolManager.ToolMode getDefaultStylusToolMode (Context context)

Gets default stylus tool mode from shared preferences

Parameters
context The context
Returns
  • Default stylus tool mode

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 getDrawWithFinger (Context context)

Gets draw with finger mode from shared preferences

Parameters
context The context
Returns
  • true if finger should draw when stylus as pen is enabled

public static String getEditUriBackupFilePath (Context context)

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 boolean getFollowSystemDarkMode (Context context)

Gets whether to follow the system setting for dark mode

Parameters
context The context
Returns
  • true if follow the system dark mode, false otherwise

public static boolean getFreeHighlighterSmoothing (Context context)

Returns whether free highlighter should be auto-smoothed.

Parameters
context The context
Returns
  • True if the free highlighter should be auto-smoothed. Default to true.

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 getInRTLMode (Context context)

Get whether the viewer should be in RTL mode.

Parameters
context the Context
Returns
  • whether RTL was in use

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 String getOpenUrlPageStateAsyncCache (Context context)

Gets the open url last viewed zoom, h pos, v pos, rotation 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 boolean getQuickBookmarkCreation (Context context)

Returns whether quick bookmark creation is enabled in the viewer.

Parameters
context The context
Returns
  • True whether quick bookmark creation is enabled.

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 String getSavedHomeToolbarMenu (Context context)

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 getShowAnnotationIndicator (Context context)

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

Parameters
context The context
Returns
  • True if annotation note indicator is should be displayed.

public static boolean getShowNavigationBarForNewUI (Context context)

Returns whether the system navigation bar is visible in the new UI.

Parameters
context The context
Returns
  • True is the system navigation bar is visible, default to true.

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 boolean getShowScrollbarGuideline (Context context)

Returns whether the scrollbar guideline should be shown with the scrollbar.

Parameters
context The context
Returns
  • True if the scrollbar guideline should be shown with the scrollbar.

public static boolean getShowStatusBarForNewUI (Context context)

Returns whether the system status bar is visible in the new UI.

Parameters
context The context
Returns
  • True is the system status bar is visible, default to false.

public static boolean getShowTabBarForNewUI (Context context)

Returns whether the tab bar is visible in the new UI for tablets.

Parameters
context The context
Returns
  • True is the tab bar is visible for tablets, default to true.

public static boolean getShowTabBarForPhone (Context context)

Returns whether the tab bar is visible in the new UI for phones.

Parameters
context The context
Returns
  • True if the tab bar is visible for phones, default to false.

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 int getThumbListFilterMode (Context context, int defaultMode)

Gets filter mode for thumbnails view

Parameters
context context to shared preferences
defaultMode one of FILTER_MODE_NORMAL FILTER_MODE_ANNOTATED FILTER_MODE_BOOKMARKED

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 setAllowPageChangeOnTap (Context context, boolean changePage)

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

Parameters
context The context
changePage Whether the page should turn

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 suffix, String annotStyleJSON)

Sets annotation style preset

Parameters
context the context
annotType annotation type
presetIndex preset index
suffix suffix string to uniquely identify this annot style
annotStyleJSON annotation style in JSON string format

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

Sets annotation style preset

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

public static void setAnnotStylesMoreAnnotType (Context context, int annotType, int presetIndex, String suffix, int moreAnnotType)

Sets annotation preset style picker more annot type selected type

Parameters
context the context
annotType annotation type
presetIndex preset index
suffix suffix string to uniquely identify this annot style
moreAnnotType more annot type selected

public static void setAnnotStylesTabIndex (Context context, int annotType, int presetIndex, String suffix, int tabIndex)

Sets annotation preset style picker tab index

Parameters
context the context
annotType annotation type
presetIndex preset index
suffix suffix string to uniquely identify this annot style
tabIndex the tab index

public static void setAnnotToolbarVisibleAnnotTypes (Context context, String visibleAnnotTypes)

Sets visible annotation types in annotation toolbar

Parameters
context The context

public static void setAnnotationToolbarPosition (Context context, PdfViewCtrlTabHostFragment2.AnnotationToolbarPosition annotationToolbarPosition)

Sets annotation toolbar position in the viewer

Parameters
context The context
annotationToolbarPosition annotation toolbar position in the viewer

public static void setAuthorNameHasBeenAsked (Context context)

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

Parameters
context The context

public static void setAutoSelectAnnotation (Context context, boolean value)

Sets whether the show quick menu mode is enabled.

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

public static void setColorManagement (Context context, boolean enabled)

Sets whether the color management is enabled.

Parameters
context The context
enabled True if the color management is enabled

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 setCopyAnnotatedTextToNote (Context context, boolean value)

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

Parameters
context The context
value True if the copy annotated text to note 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 setDefaultStylusToolMode (Context context, ToolManager.ToolMode mode)

Sets the default stylus tool mode in the shared preferences.

Parameters
context The context
mode The tool mode

public static void setDrawWithFinger (Context context, boolean drawWithFinger)

Sets whether the finger should draw when stylus as pen is enabled in the shared preferences.

Parameters
context The context
drawWithFinger whether the finger should draw when stylus as pen is enabled

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 setFollowSystemDarkMode (Context context, boolean followSystem)

Sets whether to follow the system setting for dark mode

Parameters
context The context
followSystem true if follow the system dark mode, false otherwise

public static void setFreeTextFonts (Context context, Set<String> value)

Sets available fonts for free text annotations.

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

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 setInkSmoothing (Context context, boolean value)

Sets whether ink drawn with a finger should be smoothed.

Parameters
context The context
value True if the ink smoothing 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 setOpenUrlPageStateAsyncCache (Context context, String jsonString)

Sets the open url last viewed zoom, h pos, v pos, rotation 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 setSavedHomeToolbarMenu (Context context, String toolbarMenu)

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 setShowAnnotationIndicator (Context context, boolean value)

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

Parameters
context The context
value True if annotation note indicator is should be displayed.

public static void setShowNavigationBarForNewUI (Context context, boolean show)

Sets whether the system navigation bar is visible in the new UI.

Parameters
context The context
show whether the navigation status bar is visible

public static void setShowScrollbarGuideline (Context context, boolean showGuideline)

Sets whether the scrollbar guideline should be shown with the scrollbar.

Parameters
context The context
showGuideline Whether the scrollbar guideline should be shown with the scrollbar.

public static void setShowStatusBarForNewUI (Context context, boolean show)

Sets whether the system status bar is visible in the new UI.

Parameters
context The context
show whether the system status bar is visible

public static void setShowTabBarForNewUI (Context context, boolean show)

Sets whether the tab bar is visible in the new UI for tablets.

Parameters
context The context
show whether the tab bar is visible for tablets

public static void setShowTabBarForPhone (Context context, boolean show)

Sets whether the tab bar is visible in the new UI for phones.

Parameters
context The context
show whether the tab bar is visible for phones

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 updateBackupCacheFolderPath (Context context, String path)

Updates backup folder path

Parameters
context The context
path The local folder path

public static void updateBackupCacheFolderTree (Context context, String path)

Updates backup folder tree

Parameters
context The context
path backup folder tree path

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 updateEditUriBackupFilePath (Context context, String filepath)

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 updateInRTLMode (Context context, boolean isRTL)

Update whether the viewer should be in RTL mode.

Parameters
context the Context
isRTL whether RTL was in use

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 updateThumbListFilterMode (Context context, int mode)

Sets filter mode for thumbnails view

Parameters
context context to shared preferences
mode one of FILTER_MODE_NORMAL FILTER_MODE_ANNOTATED FILTER_MODE_BOOKMARKED

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.