class LendingDetailAdapter : Adapter<ViewHolder>
Part of adapters.
RecyclerView Adapter for setting up data binding on the items in the list.
<init> |
Part of adapters. LendingDetailAdapter() |
context |
: Context? Store parent context, needed to fetch colors var context: Context? |
lendObject |
: LendingObject The object that our Adapter will show the details of var lendObject: LendingObject? |
owner |
var owner: ObjectOwner? |
user |
var user: ObjectUser? |
getItemCount |
Determines how many items need to be drawn fun getItemCount(): Int |
getItemViewType |
Called when RecyclerView needs a new RecyclerView.ViewHolder to determine the type of item. fun getItemViewType(: Int): Int |
onBindViewHolder |
Called by RecyclerView to display the data at the specified position. This method should update the contents of the RecyclerView.ViewHolder to reflect the item at the given position. fun onBindViewHolder(: ViewHolder, : Int): Unit |
onCreateViewHolder |
Called when RecyclerView needs a new RecyclerView.ViewHolder of the given type to represent an item. fun onCreateViewHolder(: ViewGroup, : Int): ViewHolder |