# Show or hide the UI in our Android viewer

When using [`PdfActivity`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-activity/index.html), you might want to tweak how Nutrient handles its user interface visibility (e.g. toolbars, thumbnail bar). This can be easily configured by setting [`setUserInterfaceViewMode`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.configuration.activity/-pdf-activity-configuration/user-interface-view-mode.html) in [`PdfActivityConfiguration.Builder`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.configuration.activity/-pdf-activity-configuration/-builder/index.html).

Nutrient supports the following user interface view modes:

- `USER_INTERFACE_VIEW_MODE_AUTOMATIC` toggles the UI when clicking on the empty page and hides the UI when changing pages. This is the default.

- `USER_INTERFACE_VIEW_MODE_AUTOMATIC_BORDER_PAGES` works the same as the above, but it automatically shows the UI when scrolling to the first and the last page of the document.

- `USER_INTERFACE_VIEW_MODE_VISIBLE` makes the UI always visible.

- `USER_INTERFACE_VIEW_MODE_HIDDEN` makes the UI always invisible.

- `USER_INTERFACE_VIEW_MODE_MANUAL` disables any automatic UI controls.

User interface view mode can also be changed while [`PdfActivity`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-activity/index.html) is active by calling [`PdfActivity#setUserInterfaceViewMode`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-ui/set-user-interface-view-mode.html).

## Manual user interface view mode

If no user interface view mode matches your desired use case, you can control UI visibility manually by using `USER_INTERFACE_VIEW_MODE_MANUAL` and calling [`setUserInterfaceVisible`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-ui/set-user-interface-visible.html) to show/hide the UI when required.

For more details, take a look at `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 the [`PdfActivity`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-activity/index.html) user interface visibility. You can easily achieve this by overriding [`onUserInterfaceVisibilityChanged`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-activity/on-user-interface-visibility-changed.html), which is called when the UI visibility changes through either [`setUserInterfaceVisible`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-ui/set-user-interface-visible.html) or user interaction.
---

## Related pages

- [Customizing the form editing toolbar on Android](/guides/android/customizing-the-interface/using-form-ui-within-fragment.md)
- [Customizing our PDF viewer on Android](/guides/android/user-interface.md)
- [Localization: Change languages in our Android PDF viewer](/guides/android/features/localization.md)
- [Customizing the note editor on Android](/guides/android/customizing-the-interface/customizing-the-note-editor.md)
- [Overlay views on Android](/guides/android/features/overlay-views.md)
- [Customize toolbar menus on Android](/guides/android/customizing-the-interface/customizing-menus.md)
- [Customizing dialog modals on Android](/guides/android/customizing-the-interface/modal-dialogs-styling.md)
- [Separate the document info view in our Android viewer](/guides/android/user-interface/separate-document-info.md)
- [Customizing the thumbnail file viewer on Android](/guides/android/customizing-the-interface/customizing-the-thumbnail-bar.md)
- [Customizing the electronic signature UI on Android](/guides/android/customizing-the-interface/configuring-the-signaturepickerfragment.md)
- [Hide or customize scrollbars in our Android viewer](/guides/android/customizing-the-interface/scrollbars.md)
- [Customizing PDF viewer styling on Android](/guides/android/customizing-the-interface/appearance-styling.md)

