| java.lang.Object | |
| ↳ | com.pspdfkit.preferences.PSPDFKitPreferences |
Allows you to read and write global preferences.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | PREFERENCES_NAME | Name of the shared preferences. | |||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void |
clearPreferences()
Wipes all user preferences, handle with care.
| ||||||||||
| synchronized static PSPDFKitPreferences |
get(Context context)
Get global singleton preferences instance.
| ||||||||||
| String |
getAnnotationCreator(String defaultCreator)
Retrieves the annotation creator
| ||||||||||
| List<AnnotationTool> |
getLastAnnotationTools()
Gets the list of annotation tools as they were last used/selected.
| ||||||||||
| ToolbarCoordinatorLayout.LayoutParams.Position |
getLastToolbarPosition(ContextualToolbar contextualToolbar, ToolbarCoordinatorLayout.LayoutParams.Position defaultPosition)
Gets the last position of the given toolbar.
| ||||||||||
| boolean |
isAnnotationCreatorSet()
Checks if the annotation creator has been set
| ||||||||||
| void |
resetAnnotationCreator()
Resets the annotation creator by nullifying the value.
| ||||||||||
| void |
setAnnotationCreator(String creator)
Sets the annotation creator.
| ||||||||||
| void |
setLastAnnotationTool(AnnotationTool tool)
Sets the last used annotation tool.
| ||||||||||
| void |
setLastToolbarPosition(ContextualToolbar contextualToolbar, ToolbarCoordinatorLayout.LayoutParams.Position position)
Saves the last position of the given toolbar.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Name of the shared preferences.
Wipes all user preferences, handle with care.
Get global singleton preferences instance.
Retrieves the annotation creator
| defaultCreator | the default creator that will be returned if no creator has been previously stored. |
|---|
Gets the list of annotation tools as they were last used/selected. Items that were not yet selected are not in the list, so this means that list will be empty at the beginning so that needs to be handled as well.
Gets the last position of the given toolbar.
| contextualToolbar | Toolbar for which to get the position. |
|---|---|
| defaultPosition | Default toolbar position. |
Checks if the annotation creator has been set
false if the annotation creator has not been set, true otherwise.
Resets the annotation creator by nullifying the value.
Sets the annotation creator.
| creator | the creator to set |
|---|
Sets the last used annotation tool. This method will add the tool to the beginning of the last selected tools list. If it already exists there, it will be just moved to the first place.
| tool | Tool to be set as the last used one. |
|---|
Saves the last position of the given toolbar.
| contextualToolbar | Toolbar for which to save the position. |
|---|---|
| position | Position to be saved. |