public class

ThumbnailAdapter

extends RecyclerView.Adapter<VH extends RecyclerView.ViewHolder>
java.lang.Object
   ↳ androidx.recyclerview.widget.RecyclerView.Adapter<VH extends androidx.recyclerview.widget.RecyclerView.ViewHolder>
     ↳ com.pspdfkit.ui.thumbnail.ThumbnailAdapter

Class Overview

Recycler adapter for creating thumbnail views inside the PdfScrollableThumbnailBar.

Summary

Nested Classes
interface ThumbnailAdapter.OnThumbnailClickListener Listener for receiving page changes caused by the user touching the ThumbnailAdapter
Public Methods
int getItemCount()
int getSelectedThumbnailBorderColor()
Returns the border color for the selected thumbnail in the thumbnail bar.
int getThumbnailBorderColor()
Returns the border color for the thumbnails in the thumbnail bar.
int getThumbnailHeight()
Returns the height of the thumbnails in thumbnail bar.
int getThumbnailWidth()
Returns the width of the thumbnails in thumbnail bar.
void onBindViewHolder(ThumbnailAdapter.ThumbnailViewHolder holder, int pageIndex)
ThumbnailAdapter.ThumbnailViewHolder onCreateViewHolder(ViewGroup parent, int viewType)
void selectPage(int currentPageIndex)
Sets selected page to highlight.
void setDrawableProviders(List<PdfDrawableProvider> drawableProviders)
void setSelectedThumbnailBorderColor(int borderColor)
Sets the border color for the selected thumbnail in the thumbnail bar.
void setThumbnailBorderColor(int borderColor)
Sets the border color for the thumbnails in the thumbnail bar.
void setThumbnailHeight(int thumbnailHeight)
Sets the height of the thumbnails in thumbnail bar.
void setThumbnailWidth(int thumbnailWidth)
Sets the width of the thumbnails in thumbnail bar.
[Expand]
Inherited Methods
From class androidx.recyclerview.widget.RecyclerView.Adapter
From class java.lang.Object

Public Methods

public int getItemCount ()

public int getSelectedThumbnailBorderColor ()

Returns the border color for the selected thumbnail in the thumbnail bar.

Returns
  • Border colors of selected thumbnail.

public int getThumbnailBorderColor ()

Returns the border color for the thumbnails in the thumbnail bar.

Returns
  • Border colors of thumbnails.

public int getThumbnailHeight ()

Returns the height of the thumbnails in thumbnail bar.

Returns
  • Height of thumbnails in pixels.

public int getThumbnailWidth ()

Returns the width of the thumbnails in thumbnail bar.

Returns
  • Width of thumbnails in pixels.

public void onBindViewHolder (ThumbnailAdapter.ThumbnailViewHolder holder, int pageIndex)

public ThumbnailAdapter.ThumbnailViewHolder onCreateViewHolder (ViewGroup parent, int viewType)

public void selectPage (int currentPageIndex)

Sets selected page to highlight.

Parameters
currentPageIndex current page to highlight.

public void setDrawableProviders (List<PdfDrawableProvider> drawableProviders)

public void setSelectedThumbnailBorderColor (int borderColor)

Sets the border color for the selected thumbnail in the thumbnail bar.

Parameters
borderColor Border colors of selected thumbnail.

public void setThumbnailBorderColor (int borderColor)

Sets the border color for the thumbnails in the thumbnail bar.

Parameters
borderColor Border colors of thumbnails.

public void setThumbnailHeight (int thumbnailHeight)

Sets the height of the thumbnails in thumbnail bar.

Parameters
thumbnailHeight Height of thumbnails in pixels.

public void setThumbnailWidth (int thumbnailWidth)

Sets the width of the thumbnails in thumbnail bar.

Parameters
thumbnailWidth Width of thumbnails in pixels.