public interface

DocumentScrollListener

com.pspdfkit.listeners.scrolling.DocumentScrollListener
Known Indirect Subclasses

Class Overview

Interface for listeners that can receive scrolling events of a PdfFragment. This class may be used to implement custom scroll indicators or scrollbar views.

Summary

Public Methods
abstract void onDocumentScrolled(PdfFragment fragment, int currX, int currY, int maxX, int maxY, int extendX, int extendY)
Called whenever the document in the fragment scrolled.
abstract void onScrollStateChanged(PdfFragment fragment, ScrollState state)
Called whenever the current scroll state of the PdfFragment changed.

Public Methods

public abstract void onDocumentScrolled (PdfFragment fragment, int currX, int currY, int maxX, int maxY, int extendX, int extendY)

Called whenever the document in the fragment scrolled. Values are expressed in an arbitrary unit and may change with every call. Also maxX and maxY are not guaranteed to remain the same between two calls.

Parameters
fragment The scrolled PdfFragment.
currX Current scroll amount X.
currY Current scroll amount Y.
maxX Maximum scroll amount of the X dimension.
maxY Maximum scroll amount of the Y dimension.
extendX Extend of the visible content in the X dimension.
extendY Extend of the visible content in the Y dimension.

public abstract void onScrollStateChanged (PdfFragment fragment, ScrollState state)

Called whenever the current scroll state of the PdfFragment changed.

Parameters
fragment PdfFragment whose scroll state changed.
state The new scroll state.