package Ġcom . har era . offer Ċ Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġcom . har era . model . model get . Offer Ċ import Ġcom . har era . offer . databinding . Card View Offer Binding Ċ import Ġcom . squareup . pic asso . Pic asso Ċ Ċ class ĠOff ers Adapter ( private Ġvar Ġoffers : ĠList < Offer >) Ġ: ĊĠĠĠ ĠRecyclerView . Adapter < Offers Adapter . ViewHolder ?> () Ġ{ ĊĠĠĠ Ġoverride Ġfun ĠonCreate ViewHolder ( parent : ĠViewGroup , Ġview Type : ĠInt ): ĠViewHolder Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠViewHolder ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCard View Offer Binding . inflate ( LayoutInflater . from ( parent . context ), Ġparent , Ġfalse ) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Bind ViewHolder ( holder : ĠViewHolder , Ġposition : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ ĠPic asso . get (). load ( offers [ position ]. offer ImageUrl ). fit (). into ( holder . bind . image ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetItem Count (): ĠInt Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġoffers . size ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġset Offers ( offers : ĠList < Offer >) Ġ{ ĊĠĠĠĠĠĠĠ Ġthis . offers Ġ= Ġoffers ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġinner Ġclass ĠViewHolder ( val Ġbind : Ġ ĠCard View Offer Binding ) Ġ: ĠRecyclerView . ViewHolder ( bind . root ) Ċ }