Class ScrollableThumbnailBarLayoutManager

  • All Implemented Interfaces:
    androidx.recyclerview.widget.ItemTouchHelper.ViewDropHandler , androidx.recyclerview.widget.RecyclerView.SmoothScroller.ScrollVectorProvider

    
    public class ScrollableThumbnailBarLayoutManager
    extends LinearLayoutManager
                        

    Layout manager for scrollable thumbnail bar.

    • Constructor Detail

      • ScrollableThumbnailBarLayoutManager

        ScrollableThumbnailBarLayoutManager(Context context)
      • ScrollableThumbnailBarLayoutManager

        ScrollableThumbnailBarLayoutManager(Context context, int orientation, boolean reverseLayout)
      • ScrollableThumbnailBarLayoutManager

        ScrollableThumbnailBarLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
    • Method Detail

      • smartScrollToPosition

         void smartScrollToPosition(int position, int viewWidth, @NonNull() RecyclerView recyclerView, boolean introduceDoublePageSkew)

        Scrolls the adapter to the selected position introducing an offset for placing it in the middle, and checks the gap for for fast-scrolling if is double the recycler view width.

        Parameters:
        position - Position to scroll.
        viewWidth - Selected view width.
        recyclerView - Recycler view on which the scroll will be performed.
        introduceDoublePageSkew - Extra room for centering the view when in double page mode.