package Ġcom . jj os ft . android . lot to v illage . adapters Ċ Ċ import Ġandroid . support . v 7 . widget . RecyclerView Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroid . widget . TextView Ċ import Ġcom . jj os ft . android . lot to v illage . R Ċ import Ġcom . jj os ft . android . lot to v illage . model . Model Ċ Ċ /** Ċ Ġ* ĠCreated Ġby ĠJ JS OFT - DE SK TOP Ġon Ġ 2 0 1 7 - 0 9 - 0 4 . Ċ Ġ*/ Ċ class ĠL otto Adapter ( private Ġval Ġm Lot to Data : ĠModel . Details Of Lot to ) Ġ: ĠRecyclerView . Adapter < Lot to Adapter . ViewHolder >() Ġ{ ĊĠĠĠ Ġclass ĠViewHolder ( view : ĠView ) Ġ: ĠRecyclerView . ViewHolder ( view ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġlot to TextView Number Pri ze : ĠTextView Ġ= Ġview . findViewById ( R . id . lot to _ text _ number _ prize ) ĊĠĠĠĠĠĠĠ Ġval Ġlot to TextView Total Pri ze : ĠTextView Ġ= Ġview . findViewById ( R . id . lot to _ text _ total _ prize ) ĊĠĠĠĠĠĠĠ Ġval Ġlot to TextView Total Number : ĠTextView Ġ= Ġview . findViewById ( R . id . lot to _ text _ total _ number ) ĊĠĠĠĠĠĠĠ Ġval Ġlot to TextView Per Pri ze : ĠTextView Ġ= Ġview . findViewById ( R . id . lot to _ text _ per _ prize ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ViewHolder ( parent : ĠViewGroup , Ġview Type : ĠInt ): ĠL otto Adapter . ViewHolder Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġview Ġ= ĠLayoutInflater . from ( parent . context ). inflate ( R . layout . recycler _ lot to _ content , Ġparent , Ġfalse ) ĊĠĠĠĠĠĠĠ Ġreturn ĠViewHolder ( view ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Bind ViewHolder ( holder : ĠL otto Adapter . ViewHolder , Ġposition : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġwhen Ġ( position ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠ 0 Ġ-> Ġset Lot to Data ( holder , Ġ" 1 ëĵ ± ", Ġm Lot to Data . total Pri ze 1 , Ġm Lot to Data . total Number 1 , Ġm Lot to Data . per Pri ze 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠĠ 1 Ġ-> Ġset Lot to Data ( holder , Ġ" 2 ëĵ ± ", Ġm Lot to Data . total Pri ze 2 , Ġm Lot to Data . total Number 2 , Ġm Lot to Data . per Pri ze 2 ) ĊĠĠĠĠĠĠĠĠĠĠĠĠ 2 Ġ-> Ġset Lot to Data ( holder , Ġ" 3 ëĵ ± ", Ġm Lot to Data . total Pri ze 3 , Ġm Lot to Data . total Number 3 , Ġm Lot to Data . per Pri ze 3 ) ĊĠĠĠĠĠĠĠĠĠĠĠĠ 3 Ġ-> Ġset Lot to Data ( holder , Ġ" 4 ëĵ ± ", Ġm Lot to Data . total Pri ze 4 , Ġm Lot to Data . total Number 4 , Ġm Lot to Data . per Pri ze 4 ) ĊĠĠĠĠĠĠĠĠĠĠĠĠ 4 Ġ-> Ġset Lot to Data ( holder , Ġ" 5 ëĵ ± ", Ġm Lot to Data . total Pri ze 5 , Ġm Lot to Data . total Number 5 , Ġm Lot to Data . per Pri ze 5 ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetItem Count (): ĠInt Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġ 5 ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġset Lot to Data ( holder : ĠL otto Adapter . ViewHolder , Ġnumber Pri ze : ĠString , Ġtotal Pri ze : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtotal Number : ĠString , Ġper Pri ze : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġholder . lot to TextView Number Pri ze . text Ġ= Ġnumber Pri ze ĊĠĠĠĠĠĠĠ Ġholder . lot to TextView Total Pri ze . text Ġ= Ġtotal Pri ze ĊĠĠĠĠĠĠĠ Ġholder . lot to TextView Total Number . text Ġ= Ġtotal Number ĊĠĠĠĠĠĠĠ Ġholder . lot to TextView Per Pri ze . text Ġ= Ġper Pri ze ĊĠĠĠ Ġ} Ċ }