package Ġcom . is mail hak ki ay din . foot ball . ui . fixture Ċ Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . databinding . Data Binding Util Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġcom . is mail hak ki ay din . foot ball . R Ċ import Ġcom . is mail hak ki ay din . foot ball . databinding . Item Fixture Binding Ċ import Ġcom . is mail hak ki ay din . foot ball . model . fixture . Fixture Ċ Ċ class ĠFix ture Adapter ( val Ġfixture List : List < Fixture >, Ġval Ġon Item Click :( Fixture )-> Unit ): RecyclerView . Adapter < Fixture Adapter . Fixture ViewHolder >() Ġ{ ĊĠĠĠ Ġclass ĠFix ture ViewHolder ( var Ġview : Item Fixture Binding ): RecyclerView . ViewHolder ( view . root ) Ġ{ ĊĠĠĠĠĠĠĠ Ġfun Ġbind ( fixture : ĠFix ture , Ġon Item Click : Ġ( Fixture ) Ġ-> ĠUnit ){ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠitemView . setOnClickListener Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Item Click ( fixture ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ViewHolder ( parent : ĠViewGroup , Ġview Type : ĠInt ): ĠFix ture ViewHolder Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġinf late Ġ= ĠLayoutInflater . from ( parent . context ) ĊĠĠĠĠĠĠĠ Ġval Ġview Ġ= ĠData Binding Util . inflate < Item Fixture Binding >( inflate , ĠR . layout . item _ fixture , parent , false ) ĊĠĠĠĠĠĠĠ Ġreturn ĠFix ture ViewHolder ( view ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetItem Count (): ĠInt Ġ= Ġfixture List . size ĊĊĠĠĠ Ġoverride Ġfun Ġon Bind ViewHolder ( holder : ĠFix ture ViewHolder , Ġposition : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġholder . view . fixture Ġ= Ġfixture List [ position ] ĊĠĠĠĠĠĠĠ Ġholder . bind ( fixture List [ position ], Ġon Item Click ) ĊĠĠĠ Ġ} Ċ }