package Ġcom . va ib hav . assignment hub . ui . screens . on Board ing Screen Ċ Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . core . view . isVisible Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġcom . va ib hav . assignment hub . data . models . On Board ing Ċ import Ġcom . va ib hav . assignment hub . databinding . On Board ing Design Binding Ċ Ċ class ĠOn Board ing Adapter ( ĊĠĠĠ Ġprivate Ġval Ġlist : ĠList < On Board ing >, ĊĠĠĠ Ġprivate Ġval Ġon Continue Clicked : Ġ() Ġ-> ĠUnit Ċ ) Ġ: ĊĠĠĠ ĠRecyclerView . Adapter < On Board ing Adapter . on Board ing ViewHolder >() Ġ{ ĊĠĠĠ Ġoverride Ġfun ĠonCreate ViewHolder ( parent : ĠViewGroup , Ġview Type : ĠInt ): Ġon Board ing ViewHolder Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġbinding Ġ= ĠLayoutInflater . from ( parent . context ) ĊĠĠĠĠĠĠĠ Ġreturn Ġon Board ing ViewHolder ( On Board ing Design Binding . inflate ( binding , Ġparent , Ġfalse )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Bind ViewHolder ( holder : Ġon Board ing ViewHolder , Ġposition : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġholder . bind ( list [ position ]) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetItem Count (): ĠInt Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġlist . size ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġinner Ġclass Ġon Board ing ViewHolder ( private Ġval Ġbinding : ĠOn Board ing Design Binding ) Ġ: ĊĠĠĠĠĠĠĠ ĠRecyclerView . ViewHolder ( binding . root ) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbinding . continue Button . setOnClickListener Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Continue Clicked () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġfun Ġbind ( on boarding : ĠOn Board ing ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbinding . continue Button . isVisible Ġ= Ġadapter Position Ġ== Ġlist . size Ġ- Ġ 1 ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbinding . on bor ading Ġ= Ġon boarding ĊĠĠĠĠĠĠĠ Ġ} ĊĊĊĠĠĠ Ġ} Ċ Ċ }