Class PdfActivityConfiguration
-
- All Implemented Interfaces:
-
android.os.Parcelable
public abstract class PdfActivityConfiguration implements Parcelable
Configuration for PDF display in a separate activity or com.pspdfkit.ui.PdfUiFragment. Use build to create an instance of this class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
PdfActivityConfiguration.Builder
Builder used to construct a PdfActivityConfiguration instance.
public @interface
PdfActivityConfiguration.SearchType
Type of search. May be SEARCH_INLINE or SEARCH_MODULAR.
-
Field Summary
Fields Modifier and Type Field Description public final static int
SEARCH_INLINE
public final static int
SEARCH_MODULAR
public final static int
NO_THEME
public final static EnumSet<AnnotationType>
DEFAULT_LISTED_ANNOTATION_TYPES
-
Constructor Summary
Constructors Constructor Description PdfActivityConfiguration()
-
Method Summary
Modifier and Type Method Description abstract PdfConfiguration
getConfiguration()
Returns configuration for the document. abstract String
getActivityTitle()
Returns the title set to the target activity. abstract int
getLayout()
Returns the id for the layout used by the launched activity, defaults to pspdf__pdf_activity.. abstract int
getTheme()
Returns theme resource used to override default theme of the launched activity. abstract int
getDarkTheme()
Returns theme resource used to override dark theme of the launched activity. abstract boolean
isImmersiveMode()
Indicates whether the immersive mode is activated or not. abstract boolean
isShowPageNumberOverlay()
Indicates whether the page number overlay is set to show or not. abstract boolean
isSignatureButtonPositionForcedInMainToolbar()
Indicates whether the signature button position is forced in the main toolbar or not. abstract boolean
isShowPageLabels()
Indicates whether the page labels are set to show or not. abstract boolean
isShowDocumentTitleOverlayEnabled()
Indicates whether the document title overlay is set to show or not. abstract boolean
isShowNavigationButtonsEnabled()
Indicates whether the navigation buttons are set to show or not. abstract ThumbnailBarMode
getThumbnailBarMode()
Returns the thumbnail bar mode set on the activity. abstract boolean
isThumbnailGridEnabled()
Indicates whether the thumbnail grid is enabled or not. abstract boolean
isDocumentEditorEnabled()
Indicates whether the document editor is enabled or not. abstract boolean
isSearchEnabled()
Indicates whether the search is enabled or not. abstract boolean
isSettingsItemEnabled()
Indicates whether the settings menu item is shown or not. abstract EnumSet<SettingsMenuItemType>
getSettingsMenuItemShown()
Returns items shown in the settings menu. abstract int
getSearchType()
Returns the search type set on the activity. abstract boolean
isPrintingEnabled()
Indicates whether the printing support is enabled or not. abstract UserInterfaceViewMode
getUserInterfaceViewMode()
Returns the user interface mode set on the activity. abstract boolean
hideUserInterfaceWhenCreatingAnnotations()
Returns whether user interface controls should be hidden when annotation creation toolbar is in vertical position (left/right). abstract boolean
isAnnotationListEnabled()
Indicates whether the list of annotations is enabled or not. abstract boolean
isDefaultToolbarEnabled()
abstract boolean
isAnnotationListReorderingEnabled()
Indicates whether reordering annotations in the annotation list is enabled. abstract EnumSet<AnnotationType>
getListedAnnotationTypes()
Returns a set of annotation types to be displayed in the annotation list. abstract boolean
isOutlineEnabled()
Indicates whether the outline is enabled or not. abstract boolean
isEmbeddedFilesViewEnabled()
Indicates whether the embedded files view is enabled or not. abstract boolean
isBookmarkListEnabled()
Indicates whether the list of bookmarks is enabled or not. abstract boolean
isBookmarkEditingEnabled()
Indicates whether the bookmarks can be edited or not. abstract boolean
isDocumentInfoViewEnabled()
Indicates whether the document info view is enabled or not. abstract boolean
isDocumentInfoViewSeparated()
Indicates whether the document info view is a separate window, or displayed as a tab in the outline abstract int
page()
Returns the 0-indexed page number at which the document will be initially displayed. abstract SearchConfiguration
getSearchConfiguration()
Returns the search configuration applied to the search views. abstract boolean
isAnnotationNoteHintingEnabled()
Indicates whether to show visual indicators for annotations that have annotation notes. abstract TabBarHidingMode
getTabBarHidingMode()
Returns the tab bar hiding mode set on the activity. abstract boolean
isVolumeButtonsNavigationEnabled()
Indicates whether to use volume buttons for navigation between document pages. abstract boolean
isRedactionUiEnabled()
Indicates whether we show the UI to apply redactions when there are in the document. abstract boolean
isReaderViewEnabled()
Indicates whether we display the reader view and its action icon in the main toolbar. -
-
Method Detail
-
getConfiguration
@NonNull() abstract PdfConfiguration getConfiguration()
Returns configuration for the document.
- Returns:
Configuration for the core of PSPDFKit rendering engine.
-
getActivityTitle
@Nullable() abstract String getActivityTitle()
Returns the title set to the target activity.
- Returns:
Title for the activity.
-
getLayout
@LayoutRes() abstract int getLayout()
Returns the id for the layout used by the launched activity, defaults to pspdf__pdf_activity..
- Returns:
Layout resource used by the launched activity.
-
getTheme
@StyleRes() abstract int getTheme()
Returns theme resource used to override default theme of the launched activity.
- Returns:
Theme resource id used by the launched activity.
-
getDarkTheme
@StyleRes() abstract int getDarkTheme()
Returns theme resource used to override dark theme of the launched activity.
- Returns:
Theme resource id used by the launched activity in the night mode.
-
isImmersiveMode
abstract boolean isImmersiveMode()
Indicates whether the immersive mode is activated or not.
- Returns:
true
if immersive mode activated,false
otherwise.
-
isShowPageNumberOverlay
abstract boolean isShowPageNumberOverlay()
Indicates whether the page number overlay is set to show or not.
- Returns:
true
if the page number overlay is set to show,false
otherwise.
-
isSignatureButtonPositionForcedInMainToolbar
abstract boolean isSignatureButtonPositionForcedInMainToolbar()
Indicates whether the signature button position is forced in the main toolbar or not. The button's visibility in the main toolbar defaults 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.- Returns:
true
when the signature button position is forced in the main toolbar.
-
isShowPageLabels
abstract boolean isShowPageLabels()
Indicates whether the page labels are set to show or not. Affects the com.pspdfkit.ui.PdfOutlineView view and the com.pspdfkit.ui.search.PdfSearchViewModular
- Returns:
true
if labels are enabled,false
otherwise.
-
isShowDocumentTitleOverlayEnabled
abstract boolean isShowDocumentTitleOverlayEnabled()
Indicates whether the document title overlay is set to show or not.
- Returns:
true
if the document title overlay is set to show,false
otherwise.
-
isShowNavigationButtonsEnabled
abstract boolean isShowNavigationButtonsEnabled()
Indicates whether the navigation buttons are set to show or not.
- Returns:
true
if the navigation buttons are set to show,false
otherwise.
-
getThumbnailBarMode
@NonNull() abstract ThumbnailBarMode getThumbnailBarMode()
Returns the thumbnail bar mode set on the activity.
- Returns:
Thumbnail bar mode set on the activity.
-
isThumbnailGridEnabled
abstract boolean isThumbnailGridEnabled()
Indicates whether the thumbnail grid is enabled or not.
- Returns:
true
if thumbnail grid is enabled,false
otherwise.
-
isDocumentEditorEnabled
abstract boolean isDocumentEditorEnabled()
Indicates whether the document editor is enabled or not.
- Returns:
true
if document editor is enabled,false
otherwise.
-
isSearchEnabled
abstract boolean isSearchEnabled()
Indicates whether the search is enabled or not.
- Returns:
true
if search is enabled,false
otherwise.
-
isSettingsItemEnabled
abstract boolean isSettingsItemEnabled()
Indicates whether the settings menu item is shown or not.
- Returns:
true
if settings menu item is enabled,false
otherwise.
-
getSettingsMenuItemShown
abstract EnumSet<SettingsMenuItemType> getSettingsMenuItemShown()
Returns items shown in the settings menu. If none are shown, settings menu icon is not shown either.
- Returns:
items shown in the settings menu.
-
getSearchType
@PdfActivityConfiguration.SearchType() abstract int getSearchType()
Returns the search type set on the activity.
- Returns:
Search type: SEARCH_INLINE or SEARCH_MODULAR.
-
isPrintingEnabled
abstract boolean isPrintingEnabled()
Indicates whether the printing support is enabled or not. Enabled by default.
- Returns:
true
if printing is enabled,false
otherwise.
-
getUserInterfaceViewMode
@NonNull() abstract UserInterfaceViewMode getUserInterfaceViewMode()
Returns the user interface mode set on the activity.
- Returns:
System user interface mode set on the document.
-
hideUserInterfaceWhenCreatingAnnotations
abstract boolean hideUserInterfaceWhenCreatingAnnotations()
Returns whether user interface controls should be hidden when annotation creation toolbar is in vertical position (left/right).
- Returns:
true
when user interface should be hidden when showing vertical annotation creation toolbar.
-
isAnnotationListEnabled
abstract boolean isAnnotationListEnabled()
Indicates whether the list of annotations is enabled or not.
- Returns:
true
if annotation list is enabled,false
otherwise.
-
isDefaultToolbarEnabled
abstract boolean isDefaultToolbarEnabled()
-
isAnnotationListReorderingEnabled
abstract boolean isAnnotationListReorderingEnabled()
Indicates whether reordering annotations in the annotation list is enabled.
- Returns:
true
if reordering annotations in the annotation list is enabled,false
otherwise.
-
getListedAnnotationTypes
abstract EnumSet<AnnotationType> getListedAnnotationTypes()
Returns a set of annotation types to be displayed in the annotation list.
- Returns:
Annotation types to be displayed if the list is enabled.
-
isOutlineEnabled
abstract boolean isOutlineEnabled()
Indicates whether the outline is enabled or not.
- Returns:
true
if outline enabled,false
otherwise.
-
isEmbeddedFilesViewEnabled
abstract boolean isEmbeddedFilesViewEnabled()
Indicates whether the embedded files view is enabled or not.
- Returns:
true
if the embedded files view enabled,false
otherwise.
-
isBookmarkListEnabled
abstract boolean isBookmarkListEnabled()
Indicates whether the list of bookmarks is enabled or not.
- Returns:
true
if bookmark list is enabled,false
otherwise.
-
isBookmarkEditingEnabled
abstract boolean isBookmarkEditingEnabled()
Indicates whether the bookmarks can be edited or not.
- Returns:
true
if bookmark list allows editing of bookmarks,false
otherwise.
-
isDocumentInfoViewEnabled
abstract boolean isDocumentInfoViewEnabled()
Indicates whether the document info view is enabled or not.
- Returns:
true
if document info view is enabled,false
otherwise.
-
isDocumentInfoViewSeparated
abstract boolean isDocumentInfoViewSeparated()
Indicates whether the document info view is a separate window, or displayed as a tab in the outline
- Returns:
true
if document info view is separate,false
otherwise.
-
page
@IntRange(from = 0) abstract int page()
Returns the 0-indexed page number at which the document will be initially displayed.
- Returns:
Page at which to start the document.
-
getSearchConfiguration
@Nullable() abstract SearchConfiguration getSearchConfiguration()
Returns the search configuration applied to the search views.
- Returns:
Search configuration for search views, holding properties used for performing search actions.
-
isAnnotationNoteHintingEnabled
abstract boolean isAnnotationNoteHintingEnabled()
Indicates whether to show visual indicators for annotations that have annotation notes.
- Returns:
true
when annotation notes hints are enabled,false
otherwise.
-
getTabBarHidingMode
@NonNull() abstract TabBarHidingMode getTabBarHidingMode()
Returns the tab bar hiding mode set on the activity.
- Returns:
Tab bar hiding mode set on the activity.
-
isVolumeButtonsNavigationEnabled
abstract boolean isVolumeButtonsNavigationEnabled()
Indicates whether to use volume buttons for navigation between document pages.
- Returns:
true
when volume buttons will be used for navigation between document pages,false
otherwise.
-
isRedactionUiEnabled
abstract boolean isRedactionUiEnabled()
Indicates whether we show the UI to apply redactions when there are in the document.
- Returns:
true
when the redaction UI should be displayed whenfalse
if it should not be displayed.
-
isReaderViewEnabled
abstract boolean isReaderViewEnabled()
Indicates whether we display the reader view and its action icon in the main toolbar.
- Returns:
true
when the reader view should be displayed,false
when it should not be displayed.
-
-
-
-