app / com.otago.open / PDFItemRecyclerViewAdapter

PDFItemRecyclerViewAdapter

class PDFItemRecyclerViewAdapter : Adapter<ViewHolder>

A standard RecyclerView.Adapter to display PDF items. The adapter binds the view holders to their data.

Parameters

list - The list of PDFItems

listener - The function to execute if a PDF is selected

See Also

PDFItemRecyclerViewAdapter

PDFListFragment

Types

ViewHolder

The RecyclerView.ViewHolder to bind PDFItems to recycler entries

class ViewHolder : ViewHolder

Constructors

<init>

A standard RecyclerView.Adapter to display PDF items. The adapter binds the view holders to their data.

PDFItemRecyclerViewAdapter(list: List<PDFItem>, listener: (PDFItem) -> Unit)

Functions

getItemCount

Gets the amount of items in this recycler

fun getItemCount(): Int

onBindViewHolder

Handles the binding of the ViewHolder to a PDFItem

fun onBindViewHolder(holder: ViewHolder, position: Int): Unit

onCreateViewHolder

Entry point of PDFItemRecyclerViewAdapter.

fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder