class LendObjectAdapter : Adapter<LendObjectViewHolder>
Part of adapters.
RecyclerView Adapter for setting up data binding on the items in the list.
<init> |
Part of adapters. LendObjectAdapter(: LendObjectClick) |
callback |
val callback: LendObjectClick |
context |
: Context? Store parent context, needed to fetch colors var context: Context? |
objects |
: MutableList The LendingObject items that our Adapter will show var objects: MutableList<LendingObject> |
getItemCount |
Determines how many items need to be drawn fun getItemCount(): Int |
onBindViewHolder |
Called by RecyclerView to display the data at the specified position. This method should update the contents of the {@link ViewHolder#itemView} to reflect the item at the given position. fun onBindViewHolder(: LendObjectViewHolder, : Int): Unit |
onCreateViewHolder |
Called when RecyclerView needs a new RecyclerView.ViewHolder of the given type to represent an item. fun onCreateViewHolder(: ViewGroup, : Int): LendObjectViewHolder |