Class VerticalScrollBar

  • All Implemented Interfaces: , android.view.KeyEvent.Callback , android.view.ViewManager , android.view.ViewParent , android.view.accessibility.AccessibilityEventSource , com.pspdfkit.listeners.scrolling.DocumentScrollListener

    public class VerticalScrollBar
    extends ViewGroup implements DocumentScrollListener

    Provides a vertical scroll indicator that can be dragged to change pages.

    • Constructor Detail

      • VerticalScrollBar

        VerticalScrollBar(Context context)
    • Method Detail

      • awakenScrollBar

         final void awakenScrollBar()

        Manually shows the scroll indicator, hiding it after some time.

      • setDocument

         final void setDocument(@NonNull() PdfDocument document)

        Sets the document that provides page count for this scrollbar.

        document - A PdfDocument providing the page count for this view.
      • onDocumentScrolled

         final void onDocumentScrolled(@NonNull() 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.

        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.