Package com.pointrlabs.core.util
Class CenterSnapHelper
-
- All Implemented Interfaces:
public final class CenterSnapHelper extends LinearSnapHelper
A LinearSnapHelper that ignores item decorations to determine a view's center
-
-
Constructor Summary
Constructors Constructor Description CenterSnapHelper()
-
Method Summary
Modifier and Type Method Description final Unit
scrollTo(Integer position, Boolean smooth)
View
findSnapView(RecyclerView.LayoutManager layoutManager)
Unit
attachToRecyclerView(RecyclerView recyclerView)
IntArray
calculateDistanceToFinalSnap(RecyclerView.LayoutManager layoutManager, View targetView)
-
Methods inherited from class androidx.recyclerview.widget.SnapHelper
calculateScrollDistance, onFling
-
Methods inherited from class androidx.recyclerview.widget.LinearSnapHelper
findTargetSnapPosition
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
findSnapView
View findSnapView(RecyclerView.LayoutManager layoutManager)
-
attachToRecyclerView
Unit attachToRecyclerView(RecyclerView recyclerView)
-
calculateDistanceToFinalSnap
IntArray calculateDistanceToFinalSnap(RecyclerView.LayoutManager layoutManager, View targetView)
-
-
-
-