package Ġcom . him an shu . bill split . adapters Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroid . widget . TextView Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġcom . him an shu . bill split . R Ċ import Ġcom . him an shu . bill split . database . exp enses . Expense Entity Ċ Ċ class ĠOrder Outer Adapter ( val Ġcontext : ĠContext , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġexp enses : ĠArrayList < Expense Entity >, ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġprivate Ġval Ġarr 1 : ĠArrayList < ArrayList < String >>, ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġprivate Ġval Ġarr 2 : ĠArrayList < ArrayList < String >> ): ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠRecyclerView . Adapter < Order Outer Adapter . Outer ViewHolder >() Ġ{ ĊĊĠĠĠ Ġclass ĠO uter ViewHolder ( val Ġview : ĠView ): ĠRecyclerView . ViewHolder ( view ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġtxt Date : TextView Ġ= Ġview . findViewById ( R . id . txt Date ) ĊĠĠĠĠĠĠĠ Ġval Ġtxt Desc : TextView Ġ= Ġview . findViewById ( R . id . txt Desc ) ĊĠĠĠĠĠĠĠ Ġval Ġtxt Total : TextView Ġ= Ġview . findViewById ( R . id . txt Total ) ĊĠĠĠĠĠĠĠ Ġval Ġre cycler Inner : RecyclerView Ġ= Ġview . findViewById ( R . id . recycler Inner ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ViewHolder ( parent : ĠViewGroup , Ġview Type : ĠInt ): ĠO uter ViewHolder Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġview Ġ= ĠLayoutInflater . from ( parent . context ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. inflate ( R . layout . recycler _ order _ outer , parent , false ) ĊĠĠĠĠĠĠĠ Ġreturn ĠO uter ViewHolder ( view ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetItem Count () Ġ= Ġexp enses . size ĊĊĠĠĠ Ġoverride Ġfun Ġon Bind ViewHolder ( holder : ĠO uter ViewHolder , Ġposition : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġholder . txt Date . text Ġ= Ġexp enses [ holder . adapter Position ]. expense _ id ĊĠĠĠĠĠĠĠ Ġholder . txt Total . text Ġ= Ġ" Rs . Ġ"+ exp enses [ holder . adapter Position ]. expense Cost . toString () ĊĠĠĠĠĠĠĠ Ġholder . txt Desc . text Ġ= Ġexp enses [ holder . adapter Position ]. ep ense Desc ĊĠĠĠĠĠĠĠ Ġval Ġlinear LayoutManager Ġ= ĠLinearLayoutManager ( context ) ĊĠĠĠĠĠĠĠ Ġval Ġre cycler Adapter Ġ= ĠOrder Inner Adapter ( context , arr 1 [ holder . adapter Position ], arr 2 [ holder . adapter Position ]) ĊĠĠĠĠĠĠĠ Ġholder . recycler Inner . layout Manager Ġ= Ġlinear LayoutManager ĊĠĠĠĠĠĠĠ Ġholder . recycler Inner . adapter Ġ= Ġre cycler Adapter ĊĠĠĠ Ġ} Ċ }