LinearSmoothScroller
RecyclerView.SmoothScroller implementation which uses a LinearInterpolator until the target position becomes a child of the RecyclerView and then uses a DecelerateInterpolator to slowly approach to target position.
If the RecyclerView.LayoutManager you are using does not implement the RecyclerView.SmoothScroller.ScrollVectorProvider interface, then you must override the computeScrollVectorForPosition method. All the LayoutManagers bundled with the support library implement this interface.
Inheritors
Properties
Link copied to clipboard
Decides if the child should be snapped from start or end, depending on where it currently is in relation to its parent.
Link copied to clipboard
Align child view's right or bottom with parent view's right or bottom
Link copied to clipboard
Align child view's left or top with parent view's left or top
Functions
Link copied to clipboard
open fun calculateDtToFit(viewStart: Int, viewEnd: Int, boxStart: Int, boxEnd: Int, snapPreference: Int): Int
Helper method for calculateDxToMakeVisible and calculateDyToMakeVisible
Link copied to clipboard
Calculates the horizontal scroll amount necessary to make the given view fully visible inside the RecyclerView.
Link copied to clipboard
Calculates the vertical scroll amount necessary to make the given view fully visible inside the RecyclerView.