package Ġeu . neo aren . know your mps Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . databinding . Data Binding Util Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroidx . fragment . app . view Models Ċ import Ġandroidx . recyclerview . widget . Divider Item Decoration Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager Ċ import Ġdagger . h ilt . android . Android EntryPoint Ċ import Ġeu . neo aren . know your mps . adapters . Party ListAdapter Ċ import Ġeu . neo aren . know your mps . databinding . Fragment Party List Binding Ċ import Ġeu . neo aren . know your mps . view models . Party List ViewModel Ċ Ċ @ Android EntryPoint Ċ class ĠParty List Fragment Ġ: ĠFragment () Ġ{ ĊĊĠ Ġprivate Ġval ĠviewModel : ĠParty List ViewModel Ġby Ġview Models () ĊĠ Ġprivate Ġlateinit Ġvar Ġbinding : ĠFragment Party List Binding ĊĊĠ Ġoverride Ġfun ĠonCreate View ( in flater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ?, ĠsavedInstanceState : ĠBundle ?): ĠView Ġ{ ĊĠĠĠ Ġbinding Ġ= ĠData Binding Util . inflate ( in flater , ĠR . layout . fragment _ party _ list , Ġcontainer , Ġfalse ) ĊĊĠĠĠ Ġ// ĠConfigure Ġparty Ġlist Ġadapter ĊĠĠĠ Ġval Ġadapter Ġ= ĠParty ListAdapter () ĊĠĠĠ Ġbinding . party List . adapter Ġ= Ġadapter ĊĠĠĠ Ġbinding . party List . set Has Fixed Size ( true ) ĊĠĠĠ Ġbinding . party List . addItem Decoration ( Divider Item Decoration ( context , ĠDiv ider Item Decoration . VERTICAL )) ĊĠĠĠ Ġbinding . party List . layout Manager Ġ= ĠLinearLayoutManager ( context ) ĊĊĠĠĠ Ġ// ĠOb serve Ġparties Ġand Ġupdate Ġadapter Ġwhen Ġneeded ĊĠĠĠ ĠviewModel . part ies . observe ( view Lifecycle Owner ) Ġ{ Ġadapter . submit List ( it ) Ġ} ĊĊĠĠĠ Ġreturn Ġbinding . root ĊĠ Ġ} Ċ Ċ } Ċ