Class PromoCardSnapHelper

  • All Implemented Interfaces:

    
    public final class PromoCardSnapHelper
    extends SnapHelper
                        

    Implementation of the SnapHelper supporting pager style snapping in horizontal orientation.

    SnapHelper can help achieve a similar behavior to androidx.viewpager.widget.ViewPager. Set both RecyclerView and the items of the RecyclerView.Adapter to have MATCH_PARENT height and width and then attach PagerSnapHelper to the RecyclerView using attachToRecyclerView.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Array<int> calculateDistanceToFinalSnap(@NonNull() RecyclerView.LayoutManager layoutManager, @NonNull() View targetView)
      View findSnapView(@NonNull() RecyclerView.LayoutManager layoutManager)
      int findTargetSnapPosition(@NonNull() RecyclerView.LayoutManager layoutManager, int velocityX, int velocityY)
      • Methods inherited from class androidx.recyclerview.widget.SnapHelper

        attachToRecyclerView, calculateScrollDistance, onFling
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • calculateDistanceToFinalSnap

        @NonNull() Array<int> calculateDistanceToFinalSnap(@NonNull() RecyclerView.LayoutManager layoutManager, @NonNull() View targetView)
      • findSnapView

        @Nullable() View findSnapView(@NonNull() RecyclerView.LayoutManager layoutManager)
      • findTargetSnapPosition

         int findTargetSnapPosition(@NonNull() RecyclerView.LayoutManager layoutManager, int velocityX, int velocityY)