Class PdfActivityConfiguration.Builder
-
- All Implemented Interfaces:
public class PdfActivityConfiguration.Builder
Builder used to construct a PdfActivityConfiguration instance.
-
-
Constructor Summary
Constructors Constructor Description PdfActivityConfiguration.Builder(Context context)
Creates a new com.pspdfkit.ui.PdfActivity configuration builder. PdfActivityConfiguration.Builder(PdfActivityConfiguration configuration)
Create a new builder from existing configuration. PdfActivityConfiguration.Builder(PdfActivityConfiguration configuration, int themeRes)
Create a new builder from existing configuration. PdfActivityConfiguration.Builder(PdfActivityConfiguration configuration, int themeRes, int themeDarkRes)
Create a new builder from existing configuration.
-
Method Summary
Modifier and Type Method Description PdfActivityConfiguration.Builder
configuration(@NonNull() PdfConfiguration configuration)
Replaces all properties from the PdfConfiguration PdfActivityConfiguration.Builder
title(@Nullable() String title)
Sets the actionbar activity title. PdfActivityConfiguration.Builder
layout(@LayoutRes() int layoutRes)
Sets a layoutRes
used by the launched activity.PdfActivityConfiguration.Builder
theme(@StyleRes() int themeRes)
Sets a themeRes
used to override default activity theme.PdfActivityConfiguration.Builder
themeDark(@StyleRes() int themeDarkRes)
Sets a themeDarkRes
used to override dark activity theme.PdfActivityConfiguration.Builder
scrollDirection(@NonNull() PageScrollDirection orientation)
Sets the scrolling direction (i.e. PdfActivityConfiguration.Builder
scrollMode(@NonNull() PageScrollMode mode)
Sets the scrolling mode. PdfActivityConfiguration.Builder
forceSignatureButtonPositionInMainToolbar(boolean forceSignatureButtonPositionInMainToolbar)
Forces the signature button to show up in the main toolbar. PdfActivityConfiguration.Builder
layoutMode(@NonNull() PageLayoutMode mode)
Sets the page layout mode, or how the document will layout the pages (as single pages, double pages or automatically). PdfActivityConfiguration.Builder
themeMode(@NonNull() ThemeMode mode)
Sets the app theme mode. PdfActivityConfiguration.Builder
firstPageAlwaysSingle(boolean firstPageAlwaysSingle)
Sets whether the first page should always be displayed as a single or not. PdfActivityConfiguration.Builder
showGapBetweenPages(boolean showGapBetweenPages)
Sets whether to show gao between pages in double page mode or not. PdfActivityConfiguration.Builder
fitMode(@NonNull() PageFitMode mode)
Sets the page fit mode. PdfActivityConfiguration.Builder
scrollbarsEnabled(boolean scrollbarsEnabled)
Sets the document scrollbars to be enabled or disabled. PdfActivityConfiguration.Builder
invertColors(boolean invertColors)
Sets if the colors will be inverted in the document. PdfActivityConfiguration.Builder
toGrayscale(boolean toGrayscale)
Sets if the colors will be converted to grayscale. PdfActivityConfiguration.Builder
autosaveEnabled(boolean isAutosaveEnabled)
Enables or disables autosaving of modified PDF documents. PdfActivityConfiguration.Builder
pagePadding(int pagePaddingDp)
Sets the padding between pages. PdfActivityConfiguration.Builder
restoreLastViewedPage(boolean restoreLastViewedPage)
Enables or disables restoration of the last viewed page when reopening a document. PdfActivityConfiguration.Builder
automaticallyGenerateLinks(boolean automaticallyGenerateLinks)
Enables or disables automatic link generation. PdfActivityConfiguration.Builder
enableCopyPaste()
Enables copy and paste of annotations. PdfActivityConfiguration.Builder
disableCopyPaste()
Disables copy and paste of annotations. PdfActivityConfiguration.Builder
setEnabledCopyPasteFeatures(@NonNull() EnumSet<CopyPasteFeatures> enabledFeatures)
Sets the CopyPasteFeatures that are enabled. PdfActivityConfiguration.Builder
undoEnabled(boolean undoEnabled)
Enables or disables undo support. PdfActivityConfiguration.Builder
redoEnabled(boolean redoEnabled)
Enables or disables redo support. PdfActivityConfiguration.Builder
setSignaturePickerOrientation(@NonNull() SignaturePickerOrientation orientation)
Sets the orientation to use for the signature picker. PdfActivityConfiguration.Builder
signatureSavingStrategy(@NonNull() SignatureSavingStrategy signatureSavingStrategy)
Signature saving strategy used within the dialog when adding signatures. PdfActivityConfiguration.Builder
signatureColorOptions(@NonNull() SignatureColorOptions signatureColorOptions)
Defines the 3 signature color options available when using the Electronic Signatures "Draw" or "Type" signing UI. PdfActivityConfiguration.Builder
signatureCreationModes(@NonNull() @Size(min = 1, max = 3) List<SignatureCreationMode> signatureCreationModes)
The ways in which the user can choose to add their signature. PdfActivityConfiguration.Builder
signatureAppearance(@Nullable() SignatureAppearance signatureAppearance)
Defines the appearance of the digital signature that is added after digitally signing a document. PdfActivityConfiguration.Builder
annotationReplyFeatures(@NonNull() AnnotationReplyFeatures annotationReplyFeatures)
Configures which part of the annotation replies UI is enabled. PdfActivityConfiguration.Builder
backgroundColor(@ColorInt() int backgroundColor)
Sets color of PDF background. PdfActivityConfiguration.Builder
loadingProgressDrawable(@Nullable() @DrawableRes() Integer loadingProgressDrawable)
Sets a drawable for loading progress throbber while document is loaded. PdfActivityConfiguration.Builder
memoryCacheSize(int memoryCacheSize)
Sets size of memory cache for rendered pages and bitmaps. PdfActivityConfiguration.Builder
enableDocumentInfoView()
Enables the document info view. PdfActivityConfiguration.Builder
disableDocumentInfoView()
Disables the document info view. PdfActivityConfiguration.Builder
useImmersiveMode(boolean useImmersiveMode)
Enabled immersive fullscreen mode in the activity. PdfActivityConfiguration.Builder
hidePageNumberOverlay()
Hides the overlay displaying currently selected page. PdfActivityConfiguration.Builder
showPageNumberOverlay()
Shows overlay displaying current page number over document. PdfActivityConfiguration.Builder
hidePageLabels()
Hides page labels (if any). PdfActivityConfiguration.Builder
showPageLabels()
Enables display of the page labels (if any). PdfActivityConfiguration.Builder
hideDocumentTitleOverlay()
Hides the overlay displaying the document title. PdfActivityConfiguration.Builder
showDocumentTitleOverlay()
Shows overlay displaying the document title. PdfActivityConfiguration.Builder
hideNavigationButtons()
Hides the navigation buttons. PdfActivityConfiguration.Builder
showNavigationButtons()
Shows the navigation buttons. PdfActivityConfiguration.Builder
hideSettingsMenu()
Hides the settings menu icon. PdfActivityConfiguration.Builder
showSettingsMenu()
Shows the settings menu icon. PdfActivityConfiguration.Builder
setSettingsMenuItems(@NonNull() EnumSet<SettingsMenuItemType> settingsMenuItemShown)
Sets the items to show in the settings menu. PdfActivityConfiguration.Builder
showThumbnailGrid()
Displays an actionbar icon to show grid of thumbnail pages. PdfActivityConfiguration.Builder
hideThumbnailGrid()
Hides the actionbar icon to show grid of thumbnail pages. PdfActivityConfiguration.Builder
disableDocumentEditor()
Disables document editing functionality in the page grid. PdfActivityConfiguration.Builder
enableDocumentEditor()
Enables document editing functionality in the page grid. PdfActivityConfiguration.Builder
enableSearch()
Enables document search functionality. PdfActivityConfiguration.Builder
disableSearch()
Disables document search functionality. PdfActivityConfiguration.Builder
enablePrinting()
Enables printing option in the menu if applicable for the document and the device. PdfActivityConfiguration.Builder
disablePrinting()
Hides printing option in the sharing menu even if printing can be done on the device. PdfActivityConfiguration.Builder
enableAnnotationList()
Enables the list of annotations. PdfActivityConfiguration.Builder
disableAnnotationList()
Disables the list of annotations. PdfActivityConfiguration.Builder
enableDefaultToolbar()
Enables default toolbar. PdfActivityConfiguration.Builder
disableDefaultToolbar()
Disables default toolbar. PdfActivityConfiguration.Builder
listedAnnotationTypes(@NonNull() EnumSet<AnnotationType> listedAnnotationTypes)
Sets the annotation types that should be displayed in the annotation list. PdfActivityConfiguration.Builder
enableBookmarkList()
Enables the display of bookmarks. PdfActivityConfiguration.Builder
disableBookmarkList()
Disables the display of bookmarks. PdfActivityConfiguration.Builder
enableBookmarkEditing()
Enables editing controls on the bookmarks list. PdfActivityConfiguration.Builder
disableBookmarkEditing()
Disabled editing controls on the bookmarks list. PdfActivityConfiguration.Builder
enableOutline()
Enables outline menu in the activity. PdfActivityConfiguration.Builder
disableOutline()
Disables outline menu in the activity. PdfActivityConfiguration.Builder
enableEmbeddedFilesView()
Enables the embedded files menu in the activity. PdfActivityConfiguration.Builder
disableEmbeddedFilesView()
Disables the embedded files menu in the activity. PdfActivityConfiguration.Builder
setEnabledShareFeatures(@NonNull() EnumSet<ShareFeatures> enabledShareFeatures)
Configures which share features are enabled in the UI. PdfActivityConfiguration.Builder
enableFormEditing()
Enables form editing functionality. PdfActivityConfiguration.Builder
disableFormEditing()
Disables form editing functionality. PdfActivityConfiguration.Builder
disableAnnotationEditing()
Disables annotation editing functionality. PdfActivityConfiguration.Builder
enableAnnotationEditing()
Enables annotation editing functionality. PdfActivityConfiguration.Builder
disableAnnotationRotation()
Disables annotation rotation functionality. PdfActivityConfiguration.Builder
enableAnnotationRotation()
Enables annotation rotation functionality. PdfActivityConfiguration.Builder
disableContentEditing()
Disables content editing functionality. PdfActivityConfiguration.Builder
enableContentEditing()
Enables content editing functionality. PdfActivityConfiguration.Builder
editableAnnotationTypes(@Nullable() List<AnnotationType> editableAnnotationTypes)
Sets a list of annotation types that can be selected on page and edited. PdfActivityConfiguration.Builder
enabledAnnotationTools(@Nullable() List<AnnotationTool> enabledAnnotationTools)
Sets a list of annotation tools that are enabled. PdfActivityConfiguration.Builder
setSelectedAnnotationResizeEnabled(boolean enabled)
Enable or disable resizing of selected annotations. PdfActivityConfiguration.Builder
setSelectedAnnotationResizeGuidesEnabled(boolean enabled)
Enables or disables resize guides. PdfActivityConfiguration.Builder
setSelectedFreetextAnnotationFontScalingOnResizeEnabled(boolean enabled)
Enables or disables resize guides. PdfActivityConfiguration.Builder
setResizeGuideSnapAllowance(@FloatRange(from = 0.0) float snapAllowance)
Sets how aggressively the resize guides works. PdfActivityConfiguration.Builder
setResizeGuideLineIntervals(@NonNull() @Size(min = 2, multiple = 2) List<Float> intervals)
Sets guide line on/off intervals sizes. PdfActivityConfiguration.Builder
setAnnotationInspectorEnabled(boolean isEnabled)
Sets whether the annotation inspector is enabled. PdfActivityConfiguration.Builder
setAnnotationNoteHintingEnabled(boolean isEnabled)
Enables or disables visual indicator shown for annotations that have annotation notes. PdfActivityConfiguration.Builder
hideUserInterfaceWhenCreatingAnnotations(boolean hideUserInterfaceWhenCreatingAnnotations)
Sets to automatically hide user interface controls when annotation creation toolbar position is in vertical position (left/right). PdfActivityConfiguration.Builder
page(@IntRange(from = 0) int pageIndex)
Sets the page to start the document at. PdfActivityConfiguration.Builder
startZoomScale(float startZoomScale)
Sets the start scale at which the document will be displayed. PdfActivityConfiguration.Builder
maxZoomScale(@FloatRange(from = 1.0, to = 20.0) float scale)
Sets the maximum zoom scale at which the document should be displayed. PdfActivityConfiguration.Builder
zoomOutBounce(boolean zoomOutBounce)
Should the zoom out below the minimum zoom have a bounce-back effect on a page. PdfActivityConfiguration.Builder
textSelectionEnabled(boolean isTextSelectionEnabled)
Enables or disables text selection (both programmatically and via long-press gesture). PdfActivityConfiguration.Builder
searchConfiguration(@NonNull() SearchConfiguration searchConfiguration)
Sets configuration used for searching, applied to search views. PdfActivityConfiguration.Builder
excludedAnnotationTypes(@NonNull() List<AnnotationType> excludedAnnotationTypes)
Sets a list of annotation types that will be excluded from rendering. PdfActivityConfiguration.Builder
videoPlaybackEnabled(boolean videoPlaybackEnabled)
Enables or disables video playback. PdfActivityConfiguration.Builder
setMeasurementToolsEnabled(boolean measurementToolsEnabled)
Enables or disables measurement tools functionality. PdfActivityConfiguration.Builder
disableAnnotationLimitedToPageBounds()
Disables the page bounds limit imposed when dragging annotations. PdfActivityConfiguration.Builder
setEnableNoteAnnotationNoZoomHandling(boolean noZoomHandlingEnabled)
Enables or disables handling for NOZOOM flag for note annotations. PdfActivityConfiguration.Builder
setJavaScriptEnabled(boolean isEnabled)
Enables or disables JavaScript processing. PdfActivityConfiguration.Builder
setTabBarHidingMode(@NonNull() TabBarHidingMode tabBarHidingMode)
Configures the tab bar hiding mode. PdfActivityConfiguration.Builder
textSelectionPopupToolbarEnabled(boolean enabled)
Sets whether the text selection popup toolbar is enabled or not. PdfActivityConfiguration.Builder
annotationPopupToolbarEnabled(boolean enabled)
Sets whether the annotation popup toolbar is enabled or not. PdfActivityConfiguration.Builder
allowMultipleBookmarksPerPage(boolean allowed)
Sets whether multiple bookmarks per page can be added or not. PdfActivityConfiguration.Builder
scrollOnEdgeTapEnabled(boolean enabled)
Sets whether taps on the edge of a page scroll to the next / previous page. PdfActivityConfiguration.Builder
animateScrollOnEdgeTaps(boolean enabled)
Sets whether page changes triggered by tapping the page edge cause an animation. PdfActivityConfiguration.Builder
scrollOnEdgeTapMargin(@IntRange(from = 1) int marginDp)
Margin in dp in which taps on the edge of the page will trigger the page navigation. PdfActivityConfiguration.Builder
enableMagnifier(boolean enabled)
Sets whether the magnifier is shown when text selection handles are touched. PdfActivityConfiguration.Builder
showSignHereOverlay(boolean showOverlay)
Sets whether the sign here overlay is shown inside of signature form fields. PdfActivityConfiguration.Builder
setOutlineElementState(OutlineElementState outlineElementState)
Sets whether outline elements are expanded or collapsed. PdfActivityConfiguration.Builder
showNoteEditorForNewNoteAnnotations(boolean showNoteEditorForNewNoteAnnotations)
Sets whether the note editor should be started automatically for newly created note annotations. PdfActivityConfiguration.Builder
enableReaderView(boolean readerViewEnabled)
Sets whether we enable the reader view in the activity or not. PdfActivityConfiguration.Builder
setMultithreadedRenderingEnabled(boolean isMultithreadedRenderingEnabled)
Sets whether the multithreaded rendering should be enabled. PdfActivityConfiguration.Builder
enableStylusOnDetection(boolean enableStylusOnDetection)
Indicates whether we should automatically detect the stylus. PdfActivityConfiguration
build()
Generates the PdfActivityConfiguration instance. PdfActivityConfiguration.Builder
setDocumentInfoViewSeparated(boolean separated)
The documeninfo view is now by default in a separate window and no longer in the outlineview. PdfActivityConfiguration.Builder
setThumbnailBarMode(@NonNull() ThumbnailBarMode thumbnailBarMode)
Sets the thumbnail bar mode. PdfActivityConfiguration.Builder
setAnnotationListReorderingEnabled(boolean enable)
Sets whether reordering annotations in the annotation list is enabled. PdfActivityConfiguration.Builder
setSearchType(@PdfActivityConfiguration.SearchType() int searchType)
Sets the search type (if search is enabled). PdfActivityConfiguration.Builder
setUserInterfaceViewMode(@NonNull() UserInterfaceViewMode userInterfaceViewMode)
Sets the user interface view mode. PdfActivityConfiguration.Builder
setVolumeButtonsNavigationEnabled(boolean isVolumeButtonsNavigationEnabled)
Enables or disables volume buttons navigation. PdfActivityConfiguration.Builder
setRedactionUiEnabled(boolean redactionUiEnabled)
Sets whether we show the UI to apply redactions when there are in the document or not. -
-
Constructor Detail
-
PdfActivityConfiguration.Builder
PdfActivityConfiguration.Builder(Context context)
Creates a new com.pspdfkit.ui.PdfActivity configuration builder.- Parameters:
context
- Context object needed for initialization.
-
PdfActivityConfiguration.Builder
PdfActivityConfiguration.Builder(PdfActivityConfiguration configuration)
Create a new builder from existing configuration.- Parameters:
configuration
- PdfConfiguration used to initialized builder.
-
PdfActivityConfiguration.Builder
PdfActivityConfiguration.Builder(PdfActivityConfiguration configuration, int themeRes)
Create a new builder from existing configuration.- Parameters:
configuration
- PdfConfiguration used to initialized builder.themeRes
- Theme used in the new configuration.
-
PdfActivityConfiguration.Builder
PdfActivityConfiguration.Builder(PdfActivityConfiguration configuration, int themeRes, int themeDarkRes)
Create a new builder from existing configuration.- Parameters:
configuration
- PdfConfiguration used to initialized builder.themeRes
- Theme used in the new configuration.themeDarkRes
- Theme used in dark mode in the new configuration.
-
-
Method Detail
-
configuration
PdfActivityConfiguration.Builder configuration(@NonNull() PdfConfiguration configuration)
Replaces all properties from the PdfConfiguration
- Parameters:
configuration
- Configuration which properties will be copied to this builder.
-
title
@NonNull() PdfActivityConfiguration.Builder title(@Nullable() String title)
Sets the actionbar activity title. If not set (or
null
), PSPDFKit will extract the title from the loaded PDF document.- Parameters:
title
- Activity title string, ornull
to use automated title extraction.
-
layout
@NonNull() PdfActivityConfiguration.Builder layout(@LayoutRes() int layoutRes)
Sets a
layoutRes
used by the launched activity. When using this, make sure that the selected layout contains all the required views. This defaults to pspdf__pdf_activity.- Parameters:
layoutRes
- Resource identifier of the activity layout.
-
theme
@NonNull() PdfActivityConfiguration.Builder theme(@StyleRes() int themeRes)
Sets a
themeRes
used to override default activity theme.- Parameters:
themeRes
- Theme resource id used by the launched activity.
-
themeDark
@NonNull() PdfActivityConfiguration.Builder themeDark(@StyleRes() int themeDarkRes)
Sets a
themeDarkRes
used to override dark activity theme.- Parameters:
themeDarkRes
- Theme resource id used by the launched activity in dark mode.
-
scrollDirection
@NonNull() PdfActivityConfiguration.Builder scrollDirection(@NonNull() PageScrollDirection orientation)
Sets the scrolling direction (i.e. the
orientation
) for the document. This defaults to HORIZONTAL.- Parameters:
orientation
- Scrolling direction from PageScrollDirection.
-
scrollMode
@NonNull() PdfActivityConfiguration.Builder scrollMode(@NonNull() PageScrollMode mode)
Sets the scrolling mode. Currently supported scrolling modes are PER_PAGE (also called paginated scroll mode) which will snap in pages, and CONTINUOUS which will not snap in to pages, but allow to scroll continuously.
- Parameters:
mode
- Page scroll mode from PageScrollMode.
-
forceSignatureButtonPositionInMainToolbar
@NonNull() PdfActivityConfiguration.Builder forceSignatureButtonPositionInMainToolbar(boolean forceSignatureButtonPositionInMainToolbar)
Forces the signature button to show up in the main toolbar. The button's visibility in the main toolbar default to
false
when the license uses Annotation Editing, as normally the annotation signature creation can be accessed via the Annotation Creation Toolbar. For the special case where the license includes Electronic Signatures without Annotation Editing, the signature button will be included in the main toolbar rather than in the Annotation Creation Toolbar. Throws when license does not support using Electronic Signatures.- Parameters:
forceSignatureButtonPositionInMainToolbar
-true
to force the signature button position in the main toolbar.
-
layoutMode
@NonNull() PdfActivityConfiguration.Builder layoutMode(@NonNull() PageLayoutMode mode)
Sets the page layout mode, or how the document will layout the pages (as single pages, double pages or automatically).
- Parameters:
mode
- Layout mode set with PageLayoutMode.
-
themeMode
@NonNull() PdfActivityConfiguration.Builder themeMode(@NonNull() ThemeMode mode)
Sets the app theme mode. Night mode automatically inverts colors.
- Parameters:
mode
- Theme mode set with ThemeMode.
-
firstPageAlwaysSingle
PdfActivityConfiguration.Builder firstPageAlwaysSingle(boolean firstPageAlwaysSingle)
Sets whether the first page should always be displayed as a single or not. This is notable only if double page mode is active.
- Parameters:
firstPageAlwaysSingle
-true
to always display the first page as a single one,false
otherwise.
-
showGapBetweenPages
PdfActivityConfiguration.Builder showGapBetweenPages(boolean showGapBetweenPages)
Sets whether to show gao between pages in double page mode or not.
- Parameters:
showGapBetweenPages
- Iftrue
, there will be a gap between pages in double page mode, iffalse
the pages will be joined.
-
fitMode
@NonNull() PdfActivityConfiguration.Builder fitMode(@NonNull() PageFitMode mode)
Sets the page fit mode. Valid modes are FIT_TO_SCREEN which will try to fit pages into the device's screen, or FIT_TO_WIDTH which will fit the page so that it's width matches the device's screen width.
- Parameters:
mode
- Page fit mode from PageFitMode.
-
scrollbarsEnabled
@NonNull() PdfActivityConfiguration.Builder scrollbarsEnabled(boolean scrollbarsEnabled)
Sets the document scrollbars to be enabled or disabled.
- Parameters:
scrollbarsEnabled
-true
to enable document scrollbars (default), orfalse
to disable them.
-
invertColors
@NonNull() PdfActivityConfiguration.Builder invertColors(boolean invertColors)
Sets if the colors will be inverted in the document. This is disabled by default.
- Parameters:
invertColors
-true
if colors should be inverted,false
otherwise.
-
toGrayscale
@NonNull() PdfActivityConfiguration.Builder toGrayscale(boolean toGrayscale)
Sets if the colors will be converted to grayscale. This is disabled by default.
- Parameters:
toGrayscale
-true
if page should be rendered in grayscale,false
otherwise.
-
autosaveEnabled
@NonNull() PdfActivityConfiguration.Builder autosaveEnabled(boolean isAutosaveEnabled)
Enables or disables autosaving of modified PDF documents. This is enabled by default.
- Parameters:
isAutosaveEnabled
-true
to enable autosave in onStop.
-
pagePadding
@NonNull() PdfActivityConfiguration.Builder pagePadding(int pagePaddingDp)
Sets the padding between pages. Defaults to 16dp.
- Parameters:
pagePaddingDp
- padding between pages in density independent pixels (dp).
-
restoreLastViewedPage
@NonNull() PdfActivityConfiguration.Builder restoreLastViewedPage(boolean restoreLastViewedPage)
Enables or disables restoration of the last viewed page when reopening a document. If
true
, the last viewed page will be restored when opening the document a second time. Iffalse
, the document will be opened at page index0
. Defaults totrue
.
-
automaticallyGenerateLinks
@NonNull() PdfActivityConfiguration.Builder automaticallyGenerateLinks(boolean automaticallyGenerateLinks)
Enables or disables automatic link generation. If
true
we will automatically parse the text and generate clickable links for all URLs and eMail addresses in the document text.- Parameters:
automaticallyGenerateLinks
-true
to enable automatic link generation, orfalse
to disable it.
-
enableCopyPaste
@NonNull() PdfActivityConfiguration.Builder enableCopyPaste()
Enables copy and paste of annotations.
-
disableCopyPaste
@NonNull() PdfActivityConfiguration.Builder disableCopyPaste()
Disables copy and paste of annotations.
-
setEnabledCopyPasteFeatures
@NonNull() PdfActivityConfiguration.Builder setEnabledCopyPasteFeatures(@NonNull() EnumSet<CopyPasteFeatures> enabledFeatures)
Sets the CopyPasteFeatures that are enabled. Defaults to all features being enabled.
-
undoEnabled
@NonNull() PdfActivityConfiguration.Builder undoEnabled(boolean undoEnabled)
Enables or disables undo support. If
true
we will keep track of edits to the document and allow the user to undo actions. Iffalse
the user will not be able to undo edits and redo will also be disabled.- Parameters:
undoEnabled
-true
to enable undo support, orfalse
to disable it.
-
redoEnabled
@NonNull() PdfActivityConfiguration.Builder redoEnabled(boolean redoEnabled)
Enables or disables redo support. If
true
we will allow the user to redo changes that were undone before. Iffalse
the user will not be able to redo edits. If undo is disabled setting this totrue
will not do anything.- Parameters:
redoEnabled
-true
to enable redo support, orfalse
to disable it.
-
setSignaturePickerOrientation
@NonNull() PdfActivityConfiguration.Builder setSignaturePickerOrientation(@NonNull() SignaturePickerOrientation orientation)
Sets the orientation to use for the signature picker. Defaults to AUTOMATIC.
- Parameters:
orientation
- The orientation to use for the signature picker.
-
signatureSavingStrategy
@NonNull() PdfActivityConfiguration.Builder signatureSavingStrategy(@NonNull() SignatureSavingStrategy signatureSavingStrategy)
Signature saving strategy used within the dialog when adding signatures. Defaults to SAVE_IF_SELECTED. This will only work if a SignatureStorage has been created and set via setSignatureStorage, otherwise NEVER_SAVE will be used.
- Parameters:
signatureSavingStrategy
- Signature strategy to apply to saving signatures.
-
signatureColorOptions
@NonNull() PdfActivityConfiguration.Builder signatureColorOptions(@NonNull() SignatureColorOptions signatureColorOptions)
Defines the 3 signature color options available when using the Electronic Signatures "Draw" or "Type" signing UI. Defaults to black, purple, and blue.
- Parameters:
signatureColorOptions
- Can be created from @ColorRes or @ColorInt with fromColorRes and fromColorInt respectively.
-
signatureCreationModes
@NonNull() PdfActivityConfiguration.Builder signatureCreationModes(@NonNull() @Size(min = 1, max = 3) List<SignatureCreationMode> signatureCreationModes)
The ways in which the user can choose to add their signature. These are shown in the order specified as tabs across the top of the signatures UI. The first entry will be selected initially. If this array contains a single entry then the tabs will be hidden. This array must not be empty and must not contain duplicates.
- Parameters:
signatureCreationModes
- An array of SignatureCreationMode.
-
signatureAppearance
@NonNull() PdfActivityConfiguration.Builder signatureAppearance(@Nullable() SignatureAppearance signatureAppearance)
Defines the appearance of the digital signature that is added after digitally signing a document. Things to configure include the graphic to use for the signature or whether the time of signing should be shown. For the full list of properties check .
- Parameters:
signatureAppearance
- The signature appearance to use ornull
to use the default appearance.
-
annotationReplyFeatures
PdfActivityConfiguration.Builder annotationReplyFeatures(@NonNull() AnnotationReplyFeatures annotationReplyFeatures)
Configures which part of the annotation replies UI is enabled. If ENABLED, the replies can be added to note annotations and annotation notes. If READ_ONLY, the replies can be looked at but none can be added or modified. If DISABLED, the reply UI is disabled entirely. This feature is only UI specific, defining the replies availability in the PdfFragment's UI. The API for retrieving and adding replies still works even if this property is DISABLED.
- Parameters:
annotationReplyFeatures
- Which features of annotation reply UI to enable.
-
backgroundColor
@NonNull() PdfActivityConfiguration.Builder backgroundColor(@ColorInt() int backgroundColor)
Sets color of PDF background.
Color#WHITE
by default.- Parameters:
backgroundColor
- PDF paper color in integer ARGB format.
-
loadingProgressDrawable
PdfActivityConfiguration.Builder loadingProgressDrawable(@Nullable() @DrawableRes() Integer loadingProgressDrawable)
Sets a drawable for loading progress throbber while document is loaded.
- Parameters:
loadingProgressDrawable
- Resource ID of the progress drawable.
-
memoryCacheSize
@NonNull() PdfActivityConfiguration.Builder memoryCacheSize(int memoryCacheSize)
Sets size of memory cache for rendered pages and bitmaps. Defaults to 1/4 of available heap size of the app.
Note: Disabling this might lead to severe performance problems.
- Parameters:
memoryCacheSize
- Size of memory cache in bytes.
-
enableDocumentInfoView
@NonNull() PdfActivityConfiguration.Builder enableDocumentInfoView()
Enables the document info view.
-
disableDocumentInfoView
@NonNull() PdfActivityConfiguration.Builder disableDocumentInfoView()
Disables the document info view.
-
useImmersiveMode
@NonNull() PdfActivityConfiguration.Builder useImmersiveMode(boolean useImmersiveMode)
Enabled immersive fullscreen mode in the activity. Note that this feature is only natively supported from Android 4.4 and newer, before that a FullScreen theme will have to be applied to PSPDFKit activity. This defaults to
false
.- Parameters:
useImmersiveMode
-true
for activating immersive mode, orfalse
to deactivate it.
-
hidePageNumberOverlay
@NonNull() PdfActivityConfiguration.Builder hidePageNumberOverlay()
Hides the overlay displaying currently selected page.
-
showPageNumberOverlay
@NonNull() PdfActivityConfiguration.Builder showPageNumberOverlay()
Shows overlay displaying current page number over document.
-
hidePageLabels
PdfActivityConfiguration.Builder hidePageLabels()
Hides page labels (if any).
-
showPageLabels
PdfActivityConfiguration.Builder showPageLabels()
Enables display of the page labels (if any).
-
hideDocumentTitleOverlay
@NonNull() PdfActivityConfiguration.Builder hideDocumentTitleOverlay()
Hides the overlay displaying the document title.
-
showDocumentTitleOverlay
@NonNull() PdfActivityConfiguration.Builder showDocumentTitleOverlay()
Shows overlay displaying the document title.
-
hideNavigationButtons
@NonNull() PdfActivityConfiguration.Builder hideNavigationButtons()
Hides the navigation buttons.
-
showNavigationButtons
@NonNull() PdfActivityConfiguration.Builder showNavigationButtons()
Shows the navigation buttons.
-
hideSettingsMenu
@NonNull() PdfActivityConfiguration.Builder hideSettingsMenu()
Hides the settings menu icon.
-
showSettingsMenu
@NonNull() PdfActivityConfiguration.Builder showSettingsMenu()
Shows the settings menu icon.
-
setSettingsMenuItems
@NonNull() PdfActivityConfiguration.Builder setSettingsMenuItems(@NonNull() EnumSet<SettingsMenuItemType> settingsMenuItemShown)
Sets the items to show in the settings menu. By default all the items are shown. If none are shown the settings menu icon will not be shown either.
- Parameters:
settingsMenuItemShown
- Sets the items to show in the settings menu.
-
showThumbnailGrid
@NonNull() PdfActivityConfiguration.Builder showThumbnailGrid()
Displays an actionbar icon to show grid of thumbnail pages.
-
hideThumbnailGrid
@NonNull() PdfActivityConfiguration.Builder hideThumbnailGrid()
Hides the actionbar icon to show grid of thumbnail pages.
-
disableDocumentEditor
@NonNull() PdfActivityConfiguration.Builder disableDocumentEditor()
Disables document editing functionality in the page grid.
-
enableDocumentEditor
@NonNull() PdfActivityConfiguration.Builder enableDocumentEditor()
Enables document editing functionality in the page grid.
-
enableSearch
@NonNull() PdfActivityConfiguration.Builder enableSearch()
Enables document search functionality.
-
disableSearch
@NonNull() PdfActivityConfiguration.Builder disableSearch()
Disables document search functionality.
-
enablePrinting
@NonNull() PdfActivityConfiguration.Builder enablePrinting()
Enables printing option in the menu if applicable for the document and the device.
-
disablePrinting
@NonNull() PdfActivityConfiguration.Builder disablePrinting()
Hides printing option in the sharing menu even if printing can be done on the device.
-
enableAnnotationList
@NonNull() PdfActivityConfiguration.Builder enableAnnotationList()
Enables the list of annotations.
-
disableAnnotationList
@NonNull() PdfActivityConfiguration.Builder disableAnnotationList()
Disables the list of annotations.
-
enableDefaultToolbar
@NonNull() PdfActivityConfiguration.Builder enableDefaultToolbar()
Enables default toolbar.
-
disableDefaultToolbar
@NonNull() PdfActivityConfiguration.Builder disableDefaultToolbar()
Disables default toolbar.
-
listedAnnotationTypes
PdfActivityConfiguration.Builder listedAnnotationTypes(@NonNull() EnumSet<AnnotationType> listedAnnotationTypes)
Sets the annotation types that should be displayed in the annotation list. By default, all types are displayed except LINK.
- Parameters:
listedAnnotationTypes
- Set of types to be displayed in the annotation list.
-
enableBookmarkList
PdfActivityConfiguration.Builder enableBookmarkList()
Enables the display of bookmarks.
-
disableBookmarkList
PdfActivityConfiguration.Builder disableBookmarkList()
Disables the display of bookmarks.
-
enableBookmarkEditing
PdfActivityConfiguration.Builder enableBookmarkEditing()
Enables editing controls on the bookmarks list.
-
disableBookmarkEditing
PdfActivityConfiguration.Builder disableBookmarkEditing()
Disabled editing controls on the bookmarks list.
-
enableOutline
@NonNull() PdfActivityConfiguration.Builder enableOutline()
Enables outline menu in the activity.
-
disableOutline
@NonNull() PdfActivityConfiguration.Builder disableOutline()
Disables outline menu in the activity.
-
enableEmbeddedFilesView
@NonNull() PdfActivityConfiguration.Builder enableEmbeddedFilesView()
Enables the embedded files menu in the activity.
-
disableEmbeddedFilesView
@NonNull() PdfActivityConfiguration.Builder disableEmbeddedFilesView()
Disables the embedded files menu in the activity.
-
setEnabledShareFeatures
PdfActivityConfiguration.Builder setEnabledShareFeatures(@NonNull() EnumSet<ShareFeatures> enabledShareFeatures)
Configures which share features are enabled in the UI. This feature is only UI specific, defining the available sharing features in the com.pspdfkit.ui.PdfActivity. The sharing API still works even if certain share feature is disabled.
- Parameters:
enabledShareFeatures
- Set of share features to enable.
-
enableFormEditing
@NonNull() PdfActivityConfiguration.Builder enableFormEditing()
Enables form editing functionality.
-
disableFormEditing
@NonNull() PdfActivityConfiguration.Builder disableFormEditing()
Disables form editing functionality.
-
disableAnnotationEditing
@NonNull() PdfActivityConfiguration.Builder disableAnnotationEditing()
Disables annotation editing functionality.
-
enableAnnotationEditing
@NonNull() PdfActivityConfiguration.Builder enableAnnotationEditing()
Enables annotation editing functionality.
-
disableAnnotationRotation
@NonNull() PdfActivityConfiguration.Builder disableAnnotationRotation()
Disables annotation rotation functionality.
-
enableAnnotationRotation
@NonNull() PdfActivityConfiguration.Builder enableAnnotationRotation()
Enables annotation rotation functionality.
-
disableContentEditing
@NonNull() PdfActivityConfiguration.Builder disableContentEditing()
Disables content editing functionality.
-
enableContentEditing
@NonNull() PdfActivityConfiguration.Builder enableContentEditing()
Enables content editing functionality.
-
editableAnnotationTypes
@NonNull() PdfActivityConfiguration.Builder editableAnnotationTypes(@Nullable() List<AnnotationType> editableAnnotationTypes)
Sets a list of annotation types that can be selected on page and edited.
- Parameters:
editableAnnotationTypes
- List of annotation types that are selectable.
-
enabledAnnotationTools
@NonNull() PdfActivityConfiguration.Builder enabledAnnotationTools(@Nullable() List<AnnotationTool> enabledAnnotationTools)
Sets a list of annotation tools that are enabled.
Note:AnnotationTool will be enabled only when its underlying annotation type (toAnnotationType) is editable (see editableAnnotationTypes) and annotation editing is enabled (see enableAnnotationEditing).
- Parameters:
enabledAnnotationTools
- List of supported annotation tools.
-
setSelectedAnnotationResizeEnabled
@NonNull() PdfActivityConfiguration.Builder setSelectedAnnotationResizeEnabled(boolean enabled)
Enable or disable resizing of selected annotations. This defaults to
true
.- Parameters:
enabled
-true
to enable resizing of selected annotations, orfalse
to disable resizing.
-
setSelectedAnnotationResizeGuidesEnabled
PdfActivityConfiguration.Builder setSelectedAnnotationResizeGuidesEnabled(boolean enabled)
Enables or disables resize guides. This defaults to
true
.- Parameters:
enabled
-true
to enable resize guides for resizable annotations, orfalse
to disable guides.
-
setSelectedFreetextAnnotationFontScalingOnResizeEnabled
PdfActivityConfiguration.Builder setSelectedFreetextAnnotationFontScalingOnResizeEnabled(boolean enabled)
Enables or disables resize guides. This defaults to
true
.- Parameters:
enabled
-true
to enable resize guides for resizable annotations, orfalse
to disable guides.
-
setResizeGuideSnapAllowance
PdfActivityConfiguration.Builder setResizeGuideSnapAllowance(@FloatRange(from = 0.0) float snapAllowance)
Sets how aggressively the resize guides works.
- Parameters:
snapAllowance
- How many pixels around the guide line will snap to guide when resizing.
-
setResizeGuideLineIntervals
PdfActivityConfiguration.Builder setResizeGuideLineIntervals(@NonNull() @Size(min = 2, multiple = 2) List<Float> intervals)
Sets guide line on/off intervals sizes. Must have an even number of entries (>=2). Even indices are specifying the "on" intervals, the odd indices specifying the "off" intervals. "On" intervals specify length of the line dashes, "Off" specify length of the line gaps.
- Parameters:
intervals
- List of ON and OFF distances.
-
setAnnotationInspectorEnabled
PdfActivityConfiguration.Builder setAnnotationInspectorEnabled(boolean isEnabled)
Sets whether the annotation inspector is enabled. This defaults to
true
.- Parameters:
isEnabled
-true
to enable annotation inspector when creating and editing the annotations.
-
setAnnotationNoteHintingEnabled
PdfActivityConfiguration.Builder setAnnotationNoteHintingEnabled(boolean isEnabled)
Enables or disables visual indicator shown for annotations that have annotation notes.
- Parameters:
isEnabled
-true
to enable visual annotation contents hint,false
to disable it.
-
hideUserInterfaceWhenCreatingAnnotations
@NonNull() PdfActivityConfiguration.Builder hideUserInterfaceWhenCreatingAnnotations(boolean hideUserInterfaceWhenCreatingAnnotations)
Sets to automatically hide user interface controls when annotation creation toolbar position is in vertical position (left/right). Changing toolbar's position to top restores user interface visibility. This options is valid only for USER_INTERFACE_VIEW_MODE_AUTOMATIC and USER_INTERFACE_VIEW_MODE_AUTOMATIC_BORDER_PAGES.
- Parameters:
hideUserInterfaceWhenCreatingAnnotations
-true
when user interface should be hidden when showing vertical annotation creation toolbar.
-
page
@NonNull() PdfActivityConfiguration.Builder page(@IntRange(from = 0) int pageIndex)
Sets the page to start the document at. Default value is
0
.- Parameters:
pageIndex
- Page at which the document should initially start (0-indexed).
-
startZoomScale
@NonNull() PdfActivityConfiguration.Builder startZoomScale(float startZoomScale)
Sets the start scale at which the document will be displayed. Defaults to DEFAULT_ZOOM.
- Parameters:
startZoomScale
- Starting zoom scale factor.
-
maxZoomScale
@NonNull() PdfActivityConfiguration.Builder maxZoomScale(@FloatRange(from = 1.0, to = 20.0) float scale)
Sets the maximum zoom scale at which the document should be displayed. Make sure this value is higher than defaultZoomScale. Defaults to MAX_ZOOM.
Allowed interval: [1.0, 20.0]
- Parameters:
scale
- Scale for the maximum allowed zoom.
-
zoomOutBounce
@NonNull() PdfActivityConfiguration.Builder zoomOutBounce(boolean zoomOutBounce)
Should the zoom out below the minimum zoom have a bounce-back effect on a page.
- Parameters:
zoomOutBounce
-true
if should have a zoom-out bounce effect,false
otherwise.
-
textSelectionEnabled
@NonNull() PdfActivityConfiguration.Builder textSelectionEnabled(boolean isTextSelectionEnabled)
Enables or disables text selection (both programmatically and via long-press gesture). This is enabled by default.
- Parameters:
isTextSelectionEnabled
-true
to enable text selection, orfalse
to disable it.
-
searchConfiguration
PdfActivityConfiguration.Builder searchConfiguration(@NonNull() SearchConfiguration searchConfiguration)
Sets configuration used for searching, applied to search views.
- Parameters:
searchConfiguration
- Configuration to be applied.
-
excludedAnnotationTypes
@NonNull() PdfActivityConfiguration.Builder excludedAnnotationTypes(@NonNull() List<AnnotationType> excludedAnnotationTypes)
Sets a list of annotation types that will be excluded from rendering.
- Parameters:
excludedAnnotationTypes
- List of annotation types that will be excluded from rendering.
-
videoPlaybackEnabled
@NonNull() PdfActivityConfiguration.Builder videoPlaybackEnabled(boolean videoPlaybackEnabled)
Enables or disables video playback. This is disabled by default.
- Parameters:
videoPlaybackEnabled
-true
if video playback is enabled,false
otherwise.
-
setMeasurementToolsEnabled
@NonNull() PdfActivityConfiguration.Builder setMeasurementToolsEnabled(boolean measurementToolsEnabled)
Enables or disables measurement tools functionality.
- Parameters:
measurementToolsEnabled
-true
to enable measurement tools (if licensed), orfalse
to disable it.
-
disableAnnotationLimitedToPageBounds
@NonNull() PdfActivityConfiguration.Builder disableAnnotationLimitedToPageBounds()
Disables the page bounds limit imposed when dragging annotations. By default this is enabled. Note: this is an experimental feature - we cannot guarantee flawless behaviour or that it won't change in future.
-
setEnableNoteAnnotationNoZoomHandling
@NonNull() PdfActivityConfiguration.Builder setEnableNoteAnnotationNoZoomHandling(boolean noZoomHandlingEnabled)
Enables or disables handling for NOZOOM flag for note annotations. Note annotations are always displayed as if NOZOOM flag was set by default.
- Parameters:
noZoomHandlingEnabled
- Iftrue
, note annotations will respect missing NOZOOM flag and will allow zoom in that case.
-
setJavaScriptEnabled
@NonNull() PdfActivityConfiguration.Builder setJavaScriptEnabled(boolean isEnabled)
Enables or disables JavaScript processing. Defaults to
true
.Note: Processing JavaScript can be slow for documents with a large number of document providers or scripts. Disabling in most cases will not have any negative effects.
- Parameters:
isEnabled
-true
to enable JavaScript processing for loaded documents.
-
setTabBarHidingMode
@NonNull() PdfActivityConfiguration.Builder setTabBarHidingMode(@NonNull() TabBarHidingMode tabBarHidingMode)
Configures the tab bar hiding mode.
- Parameters:
tabBarHidingMode
- Mode governing PdfTabBar hiding policy.
-
textSelectionPopupToolbarEnabled
@NonNull() PdfActivityConfiguration.Builder textSelectionPopupToolbarEnabled(boolean enabled)
Sets whether the text selection popup toolbar is enabled or not. If disabled, and this configuration is used within your com.pspdfkit.ui.PdfActivity, the old text selection toolbar will be used.
- Parameters:
enabled
-true
to enable it,false
otherwise.
-
annotationPopupToolbarEnabled
@NonNull() PdfActivityConfiguration.Builder annotationPopupToolbarEnabled(boolean enabled)
Sets whether the annotation popup toolbar is enabled or not. If disabled, we don't show the popup toolbar when you long press a selected annotation.
- Parameters:
enabled
-true
to enable it,false
to disable it.
-
allowMultipleBookmarksPerPage
@NonNull() PdfActivityConfiguration.Builder allowMultipleBookmarksPerPage(boolean allowed)
Sets whether multiple bookmarks per page can be added or not. If disabled only one bookmark will be allowed per page. Defaults to
false
allowing only one bookmark per page.- Parameters:
allowed
-true
to allow adding multiple bookmarks to a page, orfalse
so that only one bookmark can be added per page.
-
scrollOnEdgeTapEnabled
@NonNull() PdfActivityConfiguration.Builder scrollOnEdgeTapEnabled(boolean enabled)
Sets whether taps on the edge of a page scroll to the next / previous page. Defaults to
true
enabling scrolling by tapping the edge of pages.- Parameters:
enabled
-true
to enable scrolling by tapping the edge,false
to disable scrolling by tapping the edge.
-
animateScrollOnEdgeTaps
@NonNull() PdfActivityConfiguration.Builder animateScrollOnEdgeTaps(boolean enabled)
Sets whether page changes triggered by tapping the page edge cause an animation. Defaults to
false
making the transition instant.- Parameters:
enabled
-true
to enable page change animation,false
to disable page change animation when tapping the page edge.
-
scrollOnEdgeTapMargin
@NonNull() PdfActivityConfiguration.Builder scrollOnEdgeTapMargin(@IntRange(from = 1) int marginDp)
Margin in dp in which taps on the edge of the page will trigger the page navigation. Defaults to
24dp
.- Parameters:
marginDp
- The margin in which taps on the edge of the page should trigger page navigation.
-
enableMagnifier
@NonNull() PdfActivityConfiguration.Builder enableMagnifier(boolean enabled)
Sets whether the magnifier is shown when text selection handles are touched. Defaults to
true
.- Parameters:
enabled
-true
to enable the magnifier,false
otherwise.
-
showSignHereOverlay
@NonNull() PdfActivityConfiguration.Builder showSignHereOverlay(boolean showOverlay)
Sets whether the sign here overlay is shown inside of signature form fields. Defaults to
true
.- Parameters:
showOverlay
-true
to show the sign here overlay in signature form fields,false
to hide it.
-
setOutlineElementState
PdfActivityConfiguration.Builder setOutlineElementState(OutlineElementState outlineElementState)
Sets whether outline elements are expanded or collapsed.
- Parameters:
outlineElementState
- enum state.
-
showNoteEditorForNewNoteAnnotations
@NonNull() PdfActivityConfiguration.Builder showNoteEditorForNewNoteAnnotations(boolean showNoteEditorForNewNoteAnnotations)
Sets whether the note editor should be started automatically for newly created note annotations. Defaults to
true
.- Parameters:
showNoteEditorForNewNoteAnnotations
-true
if the note editor should be started automatically,
-
enableReaderView
@NonNull() PdfActivityConfiguration.Builder enableReaderView(boolean readerViewEnabled)
Sets whether we enable the reader view in the activity or not. It includes also the icon in the main toolbar. It requires the Reader View license to work. Defaults to
false
.- Parameters:
readerViewEnabled
-true
when the reader view should be enabled,false
when it should not be enabled.
-
setMultithreadedRenderingEnabled
@NonNull() PdfActivityConfiguration.Builder setMultithreadedRenderingEnabled(boolean isMultithreadedRenderingEnabled)
Sets whether the multithreaded rendering should be enabled. Defaults to
true
.Multi-document rendering speeds up page rendering. Disabling it may speed things up if, for example, you know you only have to render single page of the document.
- Parameters:
isMultithreadedRenderingEnabled
-true
to enable multithreaded rendering,false
to disable.
-
enableStylusOnDetection
PdfActivityConfiguration.Builder enableStylusOnDetection(boolean enableStylusOnDetection)
Indicates whether we should automatically detect the stylus. Enabling this will automatically disable all other inputs once we detect stylus use. Enabling this will also allow for swiping between pages with the finger during annotating and automatically turn on the "Use stylus for annotating" switch, if it is off. Disabling this setting allows for drawing with both the stylus and the finger but prevents swiping with the finger during annotating unless the "Use stylus for annotating" setting switch in the document has been manually turned on. Defaults to
true
-
build
@NonNull() PdfActivityConfiguration build()
Generates the PdfActivityConfiguration instance.
- Returns:
Configured activity configuration instance.
-
setDocumentInfoViewSeparated
@NonNull() PdfActivityConfiguration.Builder setDocumentInfoViewSeparated(boolean separated)
The documeninfo view is now by default in a separate window and no longer in the outlineview. If you want to keep the old behaviour with the document info in the outline view, call this method with
false
- Parameters:
separated
-true
if the document info should be displayed in a separate view (and also have an explicit item in the options menu), orfalse
otherwise
-
setThumbnailBarMode
@NonNull() PdfActivityConfiguration.Builder setThumbnailBarMode(@NonNull() ThumbnailBarMode thumbnailBarMode)
Sets the thumbnail bar mode.
- Parameters:
thumbnailBarMode
- Thumbnail bar mode to be set on the activity.
-
setAnnotationListReorderingEnabled
@NonNull() PdfActivityConfiguration.Builder setAnnotationListReorderingEnabled(boolean enable)
Sets whether reordering annotations in the annotation list is enabled. This defaults to
true
.- Parameters:
enable
-true
to enable reordering annotations in the annotation list.
-
setSearchType
@NonNull() PdfActivityConfiguration.Builder setSearchType(@PdfActivityConfiguration.SearchType() int searchType)
Sets the search type (if search is enabled).
- Parameters:
searchType
- Search type to be applied to the document, SEARCH_INLINE or SEARCH_MODULAR.
-
setUserInterfaceViewMode
@NonNull() PdfActivityConfiguration.Builder setUserInterfaceViewMode(@NonNull() UserInterfaceViewMode userInterfaceViewMode)
Sets the user interface view mode.
- Parameters:
userInterfaceViewMode
- user interface view mode to be set on the activity.
-
setVolumeButtonsNavigationEnabled
@NonNull() PdfActivityConfiguration.Builder setVolumeButtonsNavigationEnabled(boolean isVolumeButtonsNavigationEnabled)
Enables or disables volume buttons navigation. This is disabled by default.
- Parameters:
isVolumeButtonsNavigationEnabled
-true
to enable navigation using volume buttons, orfalse
to disable it.
-
setRedactionUiEnabled
@NonNull() PdfActivityConfiguration.Builder setRedactionUiEnabled(boolean redactionUiEnabled)
Sets whether we show the UI to apply redactions when there are in the document or not. Defaults to
true
.- Parameters:
redactionUiEnabled
-true
when the redaction UI should be displayed,false
if it should not be displayed.
-
-
-
-