package Ġcom . github . lib li boom . t mdb . ui . home . recycler . adapter Ċ Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . recyclerview . widget . Diff Util Ċ import Ġandroidx . recyclerview . widget . ListAdapter Ċ import Ġcom . github . lib li boom . t mdb . databinding . Item Home Best Section Binding Ċ import Ġcom . github . lib li boom . t mdb . databinding . Item Home K ids Section Binding Ċ import Ġcom . github . lib li boom . t mdb . databinding . Item Home Pop ular Section Binding Ċ import Ġcom . github . lib li boom . t mdb . databinding . Item Home Trend ing Section Binding Ċ import Ġcom . github . lib li boom . t mdb . databinding . Item Home Up coming Section Binding Ċ import Ġcom . github . lib li boom . t mdb . ui . home . Home Action Ċ import Ġcom . github . lib li boom . t mdb . ui . home . recycler . view holder . Home Best Section ViewHolder Ċ import Ġcom . github . lib li boom . t mdb . ui . home . recycler . view holder . Home K ids Section ViewHolder Ċ import Ġcom . github . lib li boom . t mdb . ui . home . recycler . view holder . Home Pop ular Section ViewHolder Ċ import Ġcom . github . lib li boom . t mdb . ui . home . recycler . view holder . Home Section Item Ċ import Ġcom . github . lib li boom . t mdb . ui . home . recycler . view holder . Home Section Type Ċ import Ġcom . github . lib li boom . t mdb . ui . home . recycler . view holder . Home Section Type . BEST Ċ import Ġcom . github . lib li boom . t mdb . ui . home . recycler . view holder . Home Section Type . K IDS Ċ import Ġcom . github . lib li boom . t mdb . ui . home . recycler . view holder . Home Section Type . POP ULAR Ċ import Ġcom . github . lib li boom . t mdb . ui . home . recycler . view holder . Home Section Type . TRE ND ING Ċ import Ġcom . github . lib li boom . t mdb . ui . home . recycler . view holder . Home Section Type . UP COM ING Ċ import Ġcom . github . lib li boom . t mdb . ui . home . recycler . view holder . Home Trend ing Section ViewHolder Ċ import Ġcom . github . lib li boom . t mdb . ui . home . recycler . view holder . Home Up coming Section ViewHolder Ċ import Ġcom . github . lib li boom . t mdb . ui . home . recycler . view holder . Home ViewHolder Ċ Ċ type alias ĠEvent Listener Ġ= Ġ( Home Action ) Ġ-> ĠUnit Ċ Ċ class ĠHome Adapter ( private Ġval Ġevent Listener : ĠEvent Listener ) Ġ: ĊĠ ĠList Adapter < Home Section Item , ĠHome ViewHolder >( Home Diff Utils ()) Ġ{ ĊĊĠ Ġoverride Ġfun ĠonCreate ViewHolder ( parent : ĠViewGroup , Ġview Type : ĠInt ): ĠHome ViewHolder Ġ{ ĊĠĠĠ Ġfun Ġinf late Home Trend ing Section Binding ( parent : ĠViewGroup ) Ġ= ĊĠĠĠĠĠ ĠItem Home Trend ing Section Binding . inflate ( LayoutInflater . from ( parent . context ), Ġparent , Ġfalse ) ĊĠĠĠ Ġfun Ġinf late Home Pop ular Section Binding ( parent : ĠViewGroup ) Ġ= ĊĠĠĠĠĠ ĠItem Home Pop ular Section Binding . inflate ( LayoutInflater . from ( parent . context ), Ġparent , Ġfalse ) ĊĠĠĠ Ġfun Ġinf late Home Up coming Section Binding ( parent : ĠViewGroup ) Ġ= ĊĠĠĠĠĠ ĠItem Home Up coming Section Binding . inflate ( LayoutInflater . from ( parent . context ), Ġparent , Ġfalse ) ĊĠĠĠ Ġfun Ġinf late Best Pop ular Section Binding ( parent : ĠViewGroup ) Ġ= ĊĠĠĠĠĠ ĠItem Home Best Section Binding . inflate ( LayoutInflater . from ( parent . context ), Ġparent , Ġfalse ) ĊĠĠĠ Ġfun Ġinf late K ids Section Binding ( parent : ĠViewGroup ) Ġ= ĊĠĠĠĠĠ ĠItem Home K ids Section Binding . inflate ( LayoutInflater . from ( parent . context ), Ġparent , Ġfalse ) ĊĠĠĠ Ġreturn Ġwhen Ġ( Home Section Type . getType ( getItem ( view Type ). type )) Ġ{ ĊĠĠĠĠĠ ĠT RE ND ING Ġ-> ĠHome Trend ing Section ViewHolder ( inflate Home Trend ing Section Binding ( parent ), Ġevent Listener ) ĊĠĠĠĠĠ ĠPOP ULAR Ġ-> ĠHome Pop ular Section ViewHolder ( inflate Home Pop ular Section Binding ( parent ), Ġevent Listener ) ĊĠĠĠĠĠ ĠUP COM ING Ġ-> ĠHome Up coming Section ViewHolder ( inflate Home Up coming Section Binding ( parent ), Ġevent Listener ) ĊĠĠĠĠĠ ĠB EST Ġ-> ĠHome Best Section ViewHolder ( inflate Best Pop ular Section Binding ( parent ), Ġevent Listener ) ĊĠĠĠĠĠ ĠK IDS Ġ-> ĠHome K ids Section ViewHolder ( inflate K ids Section Binding ( parent ), Ġevent Listener ) ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Bind ViewHolder ( holder : ĠHome ViewHolder , Ġposition : ĠInt ) Ġ{ ĊĠĠĠ Ġholder . on Bind ( getItem ( position )) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun ĠgetItem ViewType ( position : ĠInt ) Ġ= ĠgetItem ( position ). type Ċ } Ċ Ċ class ĠHome Diff Utils Ġ: ĠDiff Util . Item Callback < Home Section Item >() Ġ{ ĊĠ Ġoverride Ġfun Ġare Items The Same ( old Item : ĠHome Section Item , Ġnew Item : ĠHome Section Item ) Ġ= Ġold Item . type Ġ== Ġnew Item . type ĊĠ Ġoverride Ġfun Ġare Contents The Same ( old Item : ĠHome Section Item , Ġnew Item : ĠHome Section Item ) Ġ= Ġold Item . equals ( new Item ) Ċ } Ċ