package Ġjp . j ug g ler . sub way to oter čĊč Ċ import Ġandroidx . recyclerview . widget . RecyclerView č Ċ import Ġandroid . view . LayoutInflater č Ċ import Ġandroid . view . ViewGroup čĊč Ċ internal Ġclass ĠTable t Column Pager Adapter ( čĊ ĉ private Ġval Ġactivity Ġ: ĠAct Main č Ċ ) Ġ: Ġandroidx . recyclerview . widget . RecyclerView . Adapter < Tablet Column ViewHolder >() Ġ{ čĊĉčĊ ĉ private Ġval Ġinflater Ġ: ĠLayoutInflater čĊ ĉ private Ġval Ġcolumn List Ġ: ĠList < Column > čĊĉčĊ ĉ var Ġcolumn Width Ġ: Int Ġ= Ġ 0 Ġ// Ġdivider ãģ® å¹ ħ ãĤĴ åĲ« ãģ¾ ãģªãģĦ čĊĉčĊ ĉ init Ġ{ čĊĉ ĉ this . in flater Ġ= Ġactivity . layout Inflater čĊĉ ĉ this . column List Ġ= ĠApp 1 . get AppState ( activity ). column _ list čĊ ĉ } čĊĉčĊ ĉ override Ġfun ĠgetItem Count () Ġ: ĠInt Ġ{ čĊĉ ĉ return Ġcolumn List . size čĊ ĉ } čĊĉčĊ ĉ override Ġfun ĠonCreate ViewHolder ( parent Ġ: ĠViewGroup , Ġview Type Ġ: ĠInt ) Ġ: ĠTable t Column ViewHolder Ġ{ čĊĉ ĉ val Ġview Root Ġ= Ġinflater . inflate ( R . layout . page _ column , Ġparent , Ġfalse ) čĊĉĉčĊĉ ĉ return ĠTable t Column ViewHolder ( activity , Ġview Root ) čĊ ĉ } čĊĉčĊ ĉ override Ġfun Ġon Bind ViewHolder ( holder Ġ: ĠTable t Column ViewHolder , Ġposition Ġ: ĠInt ) Ġ{ čĊĉ ĉ val Ġcolumn Width Ġ= Ġthis . column Width čĊĉ ĉ if ( column Width Ġ> Ġ 0 ) Ġ{ čĊĉĉ ĉ val Ġlp Ġ= Ġholder . item View . layout Params čĊĉĉ ĉ lp . width Ġ= Ġcolumn Width čĊĉĉ ĉ holder . item View . layout Params Ġ= Ġlp čĊĉ ĉ } čĊĉĉčĊĉ ĉ val Ġcolumn List Ġ= Ġthis . column List čĊĉ ĉ holder . bind ( column List [ position ], Ġposition , Ġcolumn List . size ) čĊ ĉ } čĊĉčĊ ĉ override Ġfun Ġon View Re cyc led ( holder Ġ: ĠTable t Column ViewHolder ) Ġ{ čĊĉ ĉ super . on View Re cyc led ( holder ) čĊĉ ĉ holder . on View Re cyc led () čĊ ĉ } č Ċ } čĊ