Package com.pspdfkit.listeners.scrolling
Interface DocumentScrollListener
-
- All Implemented Interfaces:
public interface DocumentScrollListener
Interface for listeners that can receive scrolling events of a PdfFragment. This class may be used to implement custom scroll indicators or scrollbar views.
-
-
Method Summary
Modifier and Type Method Description abstract void
onScrollStateChanged(@NonNull() ScrollState state)
Called whenever the current scroll state of the document view has changed. void
onScrollStateChanged(@NonNull() PdfFragment fragment, @NonNull() ScrollState state)
abstract void
onDocumentScrolled(int currX, int currY, int maxX, int maxY, int extendX, int extendY)
Called whenever the document in the fragment scrolled. void
onDocumentScrolled(@NonNull() PdfFragment fragment, int currX, int currY, int maxX, int maxY, int extendX, int extendY)
-
-
Method Detail
-
onScrollStateChanged
abstract void onScrollStateChanged(@NonNull() ScrollState state)
Called whenever the current scroll state of the document view has changed.
- Parameters:
state
- The new scroll state.
-
onScrollStateChanged
@Deprecated(since = "2024.3. Use onScrollStateChanged without PdfFragment.") void onScrollStateChanged(@NonNull() PdfFragment fragment, @NonNull() ScrollState state)
-
onDocumentScrolled
abstract void onDocumentScrolled(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
andmaxY
are not guaranteed to remain the same between two calls.- Parameters:
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.
-
onDocumentScrolled
@Deprecated(since = "2024.3. Use onDocumentScrolled without PdfFragment.") void onDocumentScrolled(@NonNull() PdfFragment fragment, int currX, int currY, int maxX, int maxY, int extendX, int extendY)
-
-
-
-