package Ġcom . cons istence . pin yin . app . study Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġcom . cons istence . pin yin . R Ċ import Ġcom . cons istence . pin yin . domain . study . Study Ċ import Ġcom . cons istence . pin yin . kit . Interaction Ċ import Ġcom . cons istence . pin yin . kit . Simple Adapter Ċ import Ġcom . cons istence . pin yin . kit . Simple Adapter ViewHolder Ċ import Ġcom . jak ew h art on . r xb ind ing 2 . view . Rx View Ċ import Ġio . reactivex . subjects . Publish Subject Ċ import Ġkotlinx . android . synt hetic . main . study _ card _ view . view .* Ċ import Ġkotlinx . android . synt hetic . main . study _ list _ item . view .* Ċ Ċ class ĠStudy Adapter ( ĊĠĠĠ Ġcontext : ĠContext , ĊĠĠĠ Ġinteraction : ĠPublish Subject < Interaction < Study >> Ċ ) Ġ: ĠSimple Adapter < Study >( context , Ġinteraction ) Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġcreate ViewHolder ( parent : ĠViewGroup ): ĠSimple Adapter ViewHolder < Study > Ġ{ ĊĠĠĠĠĠĠĠ Ġval ĠviewHolder Ġ= ĠStudy ViewHolder ( in flater . inflate ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR . layout . study _ list _ item , Ġparent , Ġfalse )) ĊĊĠĠĠĠĠĠĠ ĠRx View . click s ( view Holder . item View . study _ list _ card . study _ card _ item _ edit ). map Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠInteraction ( view Holder . item View . study _ list _ card . study _ card _ item _ edit . id , Ġdata [ view Holder . adapter Position ]) ĊĠĠĠĠĠĠĠ Ġ}. subscribe ( interaction ) ĊĊĠĠĠĠĠĠĠ Ġreturn ĠviewHolder ĊĠĠĠ Ġ} Ċ } Ċ Ċ class ĠStudy ViewHolder ( item View : ĠView ) Ġ: ĠSimple Adapter ViewHolder < Study >( item View ) Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġpopulate ( position : ĠInt , Ġvalue : ĠStudy ) Ġ{ ĊĠĠĠĠĠĠĠ ĠitemView . study _ list _ card . populate ( value , Ġtrue ) ĊĠĠĠ Ġ} Ċ }