This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/android/knowledge-base/intercepting-touch-events.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Intercepting touch events passed to Nutrient

Nutrient consumes touch events on displayed documents while providing simple callbacks for the most interesting events. Refer to the document listeners 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 inside a custom ViewGroup(opens in a new tab). You can then observe all touch events and intercept them before they’re handled in PdfFragment by implementing ViewGroup#onInterceptTouchEvent()(opens in a new tab). You can read more about this mechanism in the Manage touch events in a ViewGroup(opens in a new tab) guide.