Package 

Class LinearSmoothScroller

    • Method Summary

      Modifier and Type Method Description
      int calculateDtToFit(int viewStart, int viewEnd, int boxStart, int boxEnd, int snapPreference) Helper method for calculateDxToMakeVisible and calculateDyToMakeVisible
      int calculateDyToMakeVisible(View view, int snapPreference) Calculates the vertical scroll amount necessary to make the given view fully visibleinside the RecyclerView.
      int calculateDxToMakeVisible(View view, int snapPreference) Calculates the horizontal scroll amount necessary to make the given view fully visibleinside the RecyclerView.
      • Methods inherited from class tds.androidx.recyclerview.widget.RecyclerView.SmoothScroller

        computeScrollVectorForPosition, findViewByPosition, getChildCount, getChildPosition, getLayoutManager, getTargetPosition, instantScrollToPosition, isPendingInitialRun, isRunning, setTargetPosition
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LinearSmoothScroller

        LinearSmoothScroller(Context context)
    • Method Detail

      • calculateDyToMakeVisible

         int calculateDyToMakeVisible(View view, int snapPreference)

        Calculates the vertical scroll amount necessary to make the given view fully visibleinside the RecyclerView.

        Parameters:
        view - The view which we want to make fully visible
        snapPreference - The edge which the view should snap to when entering the visiblearea.
      • calculateDxToMakeVisible

         int calculateDxToMakeVisible(View view, int snapPreference)

        Calculates the horizontal scroll amount necessary to make the given view fully visibleinside the RecyclerView.

        Parameters:
        view - The view which we want to make fully visible
        snapPreference - The edge which the view should snap to when entering the visiblearea.