---
title: "Intercepting touch events passed to Nutrient"
canonical_url: "https://www.nutrient.io/guides/android/knowledge-base/intercepting-touch-events/"
md_url: "https://www.nutrient.io/guides/android/knowledge-base/intercepting-touch-events.md"
last_updated: "2026-05-15T19:10:04.908Z"
description: "Learn to intercept touch events in Nutrient by wrapping `PdfFragment` in a custom `ViewGroup`. Detect multitouch and enhance event handling effectively."
---

Nutrient consumes touch events on displayed documents while providing simple callbacks for the most interesting events. Refer to the [document listeners](https://www.nutrient.io/guides/android/miscellaneous/document-listeners.md#document-events) guide for a full list of exposed events.

If you need to observe all touch events — for example, to detect multitouch — we recommend wrapping [`PdfFragment`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-fragment/index.html) inside a custom [`ViewGroup`](https://developer.android.com/reference/android/view/ViewGroup.html). You can then observe all touch events and intercept them before they’re handled in `PdfFragment` by implementing [`ViewGroup#onInterceptTouchEvent()`](https://developer.android.com/reference/android/view/ViewGroup.html#onInterceptTouchEvent(android.view.MotionEvent)). You can read more about this mechanism in the [Manage touch events in a ViewGroup](https://developer.android.com/training/gestures/viewgroup) guide.
---

## Related pages

- [Allow Clear Text Traffic](/guides/android/knowledge-base/allow-clear-text-traffic.md)
- [Compose Qna](/guides/android/knowledge-base/compose-qna.md)
- [Disabling Annotation Rotation](/guides/android/knowledge-base/disabling-annotation-rotation.md)
- [Custom Print Functionality](/guides/android/knowledge-base/custom-print-functionality.md)
- [Deleting Pages From A Pdf](/guides/android/knowledge-base/deleting-pages-from-a-pdf.md)
- [Easily disable share and print options in Android](/guides/android/knowledge-base/disable-share-documentinfo-print.md)
- [Managing touch scrolling in Compose containers](/guides/android/knowledge-base/document-view-inside-pager-scroll-handling.md)
- [Getting All Digital Signatures](/guides/android/knowledge-base/getting-all-digital-signatures.md)
- [Change page layout dynamically based on orientation](/guides/android/knowledge-base/dynamic-page-layout-when-changing-orientation.md)
- [Getting Signature Location](/guides/android/knowledge-base/getting-signature-location.md)
- [Invoke Search Programmatically](/guides/android/knowledge-base/invoke-search-programmatically.md)
- [Install Failed Insufficient Storage](/guides/android/knowledge-base/install-failed-insufficient-storage.md)
- [Creating invisible digital signatures in Android](/guides/android/knowledge-base/invisible-signature.md)
- [Invoking Share Action Programmatically](/guides/android/knowledge-base/invoking-share-action-programmatically.md)
- [Making Form Elements Read Only](/guides/android/knowledge-base/making-form-elements-read-only.md)
- [Override Hyperlink Behavior](/guides/android/knowledge-base/override-hyperlink-behavior.md)
- [Runtime Permissions Cordova](/guides/android/knowledge-base/runtime-permissions-cordova.md)
- [Remove Tool Variant From Toolbar](/guides/android/knowledge-base/remove-tool-variant-from-toolbar.md)
- [Customize the overflow button color in Android](/guides/android/knowledge-base/styling-overflow-button.md)
- [Save signed PDFs directly to a remote server on Android](/guides/android/knowledge-base/save-signed-pdfs-to-remote-server.md)
- [Using Pspdfkit With Dynamic Feature Modules](/guides/android/knowledge-base/using-pspdfkit-with-dynamic-feature-modules.md)

