package Ġuk . co . wed get ech . host ping er . ui . common čĊč Ċ import Ġandroidx . recyclerview . widget . RecyclerView č Ċ import Ġandroid . view . LayoutInflater č Ċ import Ġandroid . view . ViewGroup č Ċ import Ġuk . co . wed get ech . host ping er . R č Ċ import Ġuk . co . wed get ech . host ping er . model . Host čĊč Ċ class ĠHost s Adapter Ġ: ĠRecyclerView . Adapter < Host Card Holder >() Ġ{ čĊčĊĠĠĠ Ġprivate Ġvar Ġitems : ĠList < Host > Ġ= ĠList < Host >( 0 ,{ Host (" ",""," ") }) čĊčĊĠĠĠ Ġfun Ġset Hosts ( hosts Ġ: List < Host >) Ġ{ čĊĠĠĠĠĠĠĠ Ġitems Ġ= Ġhosts čĊĠĠĠĠĠĠĠ Ġnotify DataSet Changed () čĊĠĠĠ Ġ} čĊčĊĠĠĠ Ġoverride Ġfun ĠonCreate ViewHolder ( parent : ĠViewGroup , Ġview Type : ĠInt ): ĠHost Card Holder Ġ{ čĊĠĠĠĠĠĠĠ Ġval Ġview Ġ= ĠLayoutInflater . from ( parent . context ) čĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. inflate ( R . layout . card _ host , Ġparent , Ġfalse ) čĊĠĠĠĠĠĠĠ Ġreturn ĠHost Card Holder ( view ) čĊĠĠĠ Ġ} čĊčĊĠĠĠ Ġoverride Ġfun ĠgetItem Count (): ĠInt Ġ= Ġitems . size čĊčĊĠĠĠ Ġoverride Ġfun Ġon Bind ViewHolder ( holder : ĠHost Card Holder , Ġposition : ĠInt ) Ġ{ čĊĠĠĠĠĠĠĠ Ġreturn Ġholder . bind Host ( items [ position ]) čĊĠĠĠ Ġ} čĊč Ċ }