Package com.pspdfkit.ui.thumbnail
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 Summary
Constructors Constructor Description ScrollableThumbnailBarLayoutManager(Context context)
ScrollableThumbnailBarLayoutManager(Context context, int orientation, boolean reverseLayout)
ScrollableThumbnailBarLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
-
Method Summary
Modifier and Type Method Description void
smoothScrollToPosition(@NonNull() RecyclerView recyclerView, @NonNull() RecyclerView.State state, int position)
boolean
supportsPredictiveItemAnimations()
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. -
-
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
-
smoothScrollToPosition
void smoothScrollToPosition(@NonNull() RecyclerView recyclerView, @NonNull() RecyclerView.State state, int position)
-
supportsPredictiveItemAnimations
boolean supportsPredictiveItemAnimations()
-
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.
-
-
-
-