PSPDFKitPreferences

Allows you to read and write global preferences.

Properties

Link copied to clipboard
val PREFERENCES_NAME: String = "PSPDFKit"
Name of the shared preferences.

Functions

Link copied to clipboard
open fun clearPreferences()
Wipes all user preferences, handle with care.
Link copied to clipboard
Gets global singleton preferences instance.
Link copied to clipboard
open fun getAnnotationCreator(@Nullable defaultCreator: String): String
Retrieves the annotation creator
Link copied to clipboard
Gets the list of annotation tools as they were last used/selected.
Link copied to clipboard
Gets the last position of the given toolbar.
Link copied to clipboard
Gets the recently used colors.
Link copied to clipboard
Checks if the annotation creator has been set
Link copied to clipboard
Returns True if it's the first time launching comparison alignment dialog and false when it has been launched before.
Link copied to clipboard
Returns true if snapping to page graphics for measurement tools is enabled.
Link copied to clipboard
Returns true if smart guides for various angles is enabled.
Link copied to clipboard
Returns true if snapping to self is enabled.
Link copied to clipboard
Resets the annotation creator by nullifying the value.
Link copied to clipboard
open fun setAnnotationCreator(@Nullable creator: String)
Sets the annotation creator.
Link copied to clipboard
open fun setIsComparisonFirstLaunch(isComparisonFirstLaunch: Boolean)
Sets if comparison alignment dialog has been launched before
Link copied to clipboard
Sets the last used annotation tool.
Link copied to clipboard
Saves the last position of the given toolbar.
Link copied to clipboard
Enables snapping to page graphics for measurement tools.
Link copied to clipboard
open fun setRecentlyUsedColors(@NonNull recentlyUsedColors: List<Integer>)
Replaces the list of recently used colors with the new list.
Link copied to clipboard
open fun setSmartGuidesEnabled(enabled: Boolean)
Enables smart guides for predefined angles.
Link copied to clipboard
open fun setSnapToSelfEnabled(enabled: Boolean)
Enables snapping to itself at the end of shape
Link copied to clipboard
open fun setStylusSettingChangeListener(@Nullable stylusSettingChangeListener: StylusSettingChangeListener)
A listener for when the stylus setting changes for real time updates to the toolbar.
Link copied to clipboard
open fun setUseStylusForAnnotating(useStylusForAnnotating: Boolean)
Enables or disables the usage of stylus during drawing
Link copied to clipboard
Returns true if we should only use the stylus during drawing.