package Ġcom . bel tra ol uis . intr ach at . adapter Ċ Ċ import Ġandroid . support . v 7 . widget . RecyclerView Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . ViewGroup Ċ import Ġcom . bel tra ol uis . intr ach at . Control Ċ import Ġcom . bel tra ol uis . intr ach at . R Ċ import Ġcom . bel tra ol uis . intr ach at . view Holder . Talk ViewHolder Ċ Ċ class ĠTalk Adapter (): ĠRecyclerView . Adapter < Talk ViewHolder >() Ġ{ ĊĊĠĠĠ Ġvar ĠdataSet Ġ= ĠControl . conversation [ Control . active Ip ] !!. messages ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ViewHolder ( parent : ĠViewGroup , Ġview Type : ĠInt ): ĠTalk ViewHolder Ġ{ ĊĠĠĠĠĠĠĠ Ġval ĠitemView Ġ= ĠLayoutInflater . from ( parent . context ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. inflate ( R . layout . talk _ item , Ġparent , Ġfalse ) ĊĊĠĠĠĠĠĠĠ Ġreturn ĠTalk ViewHolder ( item View ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Bind ViewHolder ( holder : ĠTalk ViewHolder , Ġposition : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġholder . set ( data Set [ position ]) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetItem Count (): ĠInt Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠdataSet . size ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġupdate (){ ĊĠĠĠĠĠĠĠ ĠdataSet Ġ= ĠControl . conversation [ Control . active Ip ] !!. messages ĊĠĠĠĠĠĠĠ Ġnotify DataSet Changed () ĊĠĠĠ Ġ} Ċ }