User Interface Visibility
PdfActivity you might want to tweak how PSPDFKit handles its user interface visibility (toolbars, thumbnail bar etc.). This can be easily configured by setting
PSPDFKit supports the following user interface view modes:
USER_INTERFACE_VIEW_MODE_AUTOMATICtoggles UI when clicking on the empty page and hides UI when changing pages. This is the default.
USER_INTERFACE_VIEW_MODE_AUTOMATIC_BORDER_PAGESworks same as above, but automatically shows UI when scrolling to first and the last page of the document.
USER_INTERFACE_VIEW_MODE_VISIBLEmakes UI always visible.
USER_INTERFACE_VIEW_MODE_HIDDENmakes UI always invisible.
USER_INTERFACE_VIEW_MODE_MANUALdisables any automatic UI controls.
Manual User Interface View Mode
If no user interface view mode matches your desired use-case, you can control UI visibility completely manually by using
USER_INTERFACE_VIEW_MODE_MANUAL and calling
setUserInterfaceVisible to show/hide user interface when required.
For more details, take a look at the
UserInterfaceViewModesExample in the catalog app.
Reacting to User Interface Visibility Changes
If you are providing custom user interface components, you'll probably want to coordinate visibility of these components with
PdfActivity user interface visibility. You can easily achieve this by overriding
onUserInterfaceVisibilityChanged that is called when user interface visibility changes either through
setUserInterfaceVisible or via user interaction.