package Ġcom . was isto . github user finder . android . ui . search Ċ Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġcom . was isto . github user finder . android . databinding . Item Search History Binding Ċ import Ġcom . was isto . github user finder . domain . models . Search History Item Ċ Ċ class ĠSearch History Adapter ( private Ġval ĠviewModel : ĠSearch ViewModel ) Ġ: ĠRecyclerView . Adapter < Search History Adapter . ViewHolder >() Ġ{ ĊĊĠĠĠ Ġclass ĠViewHolder ( private Ġval Ġbinding : ĠItem Search History Binding ) Ġ: ĠRecyclerView . ViewHolder ( binding . root ) Ġ{ ĊĠĠĠĠĠĠĠ Ġfun Ġbind ( history Item : ĠSearch History Item , ĠviewModel : ĠSearch ViewModel ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbinding . history Item Ġ= Ġhistory Item ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbinding . viewModel Ġ= ĠviewModel ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġlateinit Ġvar Ġdata : ĠList < Search History Item > ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ViewHolder ( parent : ĠViewGroup , Ġview Type : ĠInt ): ĠViewHolder Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠViewHolder ( Item Search History Binding . inflate ( LayoutInflater . from ( parent . context ), Ġparent , Ġfalse )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Bind ViewHolder ( holder : ĠViewHolder , Ġposition : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġholder . bind ( data [ position ], ĠviewModel ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetItem Count (): ĠInt Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġdata . size ĊĠĠĠ Ġ} Ċ }