package Ġcom . fat ball fish . pal ms ch ool . ui . school Ċ Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroid . widget . TextView Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġcom . fat ball fish . pal ms ch ool . R Ċ import Ġcom . fat ball fish . pal ms ch ool . logic . model . real Auth . Real Auth Update Request Ċ import Ġcom . fat ball fish . pal ms ch ool . logic . model . school . School Ċ Ċ class ĠSchool Adapter ( val Ġschool List : ĠArrayList < School >, Ġval Ġfragment : ĠSchool Cho osen Fragment ) Ġ: ĊĠĠĠ ĠRecyclerView . Adapter < School Adapter . ViewHolder >() Ġ{ ĊĠĠĠ Ġinner Ġclass ĠViewHolder ( view : ĠView ) Ġ: ĠRecyclerView . ViewHolder ( view ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġtext _ school _ name : ĠTextView Ġ= Ġview . findViewById ( R . id . text _ school _ name ) ĊĠĠĠĠĠĠĠ Ġval Ġtext _ school _ location : ĠTextView Ġ= Ġview . findViewById ( R . id . text _ school _ location ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ViewHolder ( parent : ĠViewGroup , Ġview Type : ĠInt ): ĠViewHolder Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġview Ġ= ĠLayoutInflater . from ( parent . context ). inflate ( R . layout . school _ item , Ġparent , Ġfalse ) ĊĠĠĠĠĠĠĠ Ġval Ġholder Ġ= ĠViewHolder ( view ) ĊĠĠĠĠĠĠĠ Ġholder . item View . setOnClickListener Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġposition Ġ= Ġholder . adapter Position ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġschool Ġ= Ġschool List [ position ] ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġreal Auth Update Request Ġ= ĠReal Auth Update Request ( school Ġ= Ġschool . id ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfragment . real Auth Update ViewModel . update Real Auth ( real Auth Update Request ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġreturn Ġholder ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetItem Count () Ġ= Ġschool List . size ĊĊĠĠĠ Ġoverride Ġfun Ġon Bind ViewHolder ( holder : ĠViewHolder , Ġposition : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġschool Ġ= Ġschool List [ position ] ĊĠĠĠĠĠĠĠ Ġholder . text _ school _ name . text Ġ= Ġschool . name ĊĠĠĠĠĠĠĠ Ġholder . text _ school _ location . text Ġ= Ġschool . location ĊĠĠĠ Ġ} Ċ }