package Ġapps . ric as ares . com . my reddit . listing Ċ Ċ import Ġandroid . support . v 7 . widget . RecyclerView Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . ViewGroup Ċ import Ġapps . ric as ares . com . domain . presenter . Listing Item Presenter Ċ import Ġapps . ric as ares . com . my reddit . R Ċ Ċ /** Ċ Ġ* ĠCreated Ġby Ġr ic ardo Ġcas are z Ġon Ġ 3 / 2 8 / 1 8 . Ċ Ġ*/ Ċ class ĠListing Adapter ( private Ġval Ġm Presenter : ĠListing Item Presenter ) Ġ: ĊĠĠĠĠĠĠĠ ĠRecyclerView . Adapter < Listing ViewHolder >() Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ViewHolder ( parent : ĠViewGroup , Ġview Type : ĠInt ): ĠListing ViewHolder Ġ{ ĊĊĠĠĠĠĠĠĠ Ġval Ġview Ġ= ĠListing ViewHolder ( LayoutInflater . from ( parent ?. context ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. inflate ( R . layout . item _ lis it ng , Ġparent , Ġfalse )) ĊĠĠĠĠĠĠĠ Ġm Presenter . attach View ( view ) ĊĠĠĠĠĠĠĠ Ġreturn Ġview ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetItem Count (): ĠInt Ġ= Ġm Presenter . getItem Count () ĊĊĠĠĠ Ġoverride Ġfun Ġon Bind ViewHolder ( holder : ĠListing ViewHolder , Ġposition : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġm Presenter . on BindView ( holder !! , Ġposition ) ĊĠĠĠ Ġ} Ċ }