package Ġcom . j sh v arts . k mp . android Ċ Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġcom . j sh v arts . k mp . model . Member Ċ import Ġcom . squareup . pic asso . Pic asso Ċ import Ġkotlinx . android . synt hetic . main . list _ item _ member . view . member Avatar Ċ import Ġkotlinx . android . synt hetic . main . list _ item _ member . view . member Login Ċ Ċ class ĠMember Adapter ( var Ġmembers : ĠList < Member >) Ġ: ĠRecyclerView . Adapter < Member Adapter . Member ViewHolder >() Ġ{ ĊĠ Ġoverride Ġfun ĠonCreate ViewHolder ( parent : ĠViewGroup , Ġview Type : ĠInt ): ĠMember ViewHolder Ġ{ ĊĠĠĠ Ġval ĠitemView Ġ= ĊĠĠĠĠĠ ĠLayoutInflater . from ( parent . context ). inflate ( R . layout . list _ item _ member , Ġparent , Ġfalse ) ĊĠĠĠ Ġreturn ĠMember ViewHolder ( item View ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun ĠgetItem Count () Ġ= Ġmembers . size ĊĊĠ Ġoverride Ġfun Ġon Bind ViewHolder ( holder : ĠMember ViewHolder , Ġposition : ĠInt ) Ġ{ ĊĠĠĠ Ġholder . bind ( members [ position ]) ĊĠ Ġ} ĊĊĠ Ġclass ĠMember ViewHolder ( item View : ĠView ) Ġ: ĠRecyclerView . ViewHolder ( item View ) Ġ{ ĊĠĠĠ Ġfun Ġbind ( member : ĠMember ) Ġ{ ĊĠĠĠĠĠ ĠPic asso . get (). load ( member . avatar Url ). into ( item View . member Avatar ) ĊĠĠĠĠĠ ĠitemView . member Login . text Ġ= Ġmember . login ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ