package Ġcom . vi et th . gap o . presentation . features . detail Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroidx . fragment . app . activity ViewModels Ċ import Ġandroidx . fragment . app . view Models Ċ import Ġcom . vi et th . gap o . core . fragment . auto Cle ared Ċ import Ġcom . vi et th . gap o . databinding . Detail Fragment Binding Ċ import Ġcom . vi et th . gap o . presentation . Host ViewModel Ċ import Ġcom . vi et th . gap o . presentation . features . detail . view model . Detail ViewModel Ċ import Ġdagger . h ilt . android . Android EntryPoint Ċ Ċ @ Android EntryPoint Ċ class ĠDetail Fragment Ġ: ĠFragment () Ġ{ ĊĊĠĠĠ Ġprivate Ġvar Ġbinding Ġby Ġauto Cle ared < Detail Fragment Binding >() ĊĊĠĠĠ Ġprivate Ġval Ġhost ViewModel Ġby Ġactivity ViewModels < Host ViewModel >() ĊĠĠĠ Ġprivate Ġval Ġdetail ViewModel Ġby Ġview Models < Detail ViewModel >() ĊĊĠĠĠ Ġoverride Ġfun Ġon Attach ( context : ĠContext ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Attach ( context ) ĊĠĠĠĠĠĠĠ Ġhost ViewModel . hide Bottom Nav () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( ĊĠĠĠĠĠĠĠ Ġinflater : ĠLayoutInflater , ĊĠĠĠĠĠĠĠ Ġcontainer : ĠViewGroup ?, ĊĠĠĠĠĠĠĠ ĠsavedInstanceState : ĠBundle ? ĊĠĠĠ Ġ): ĠView Ġ{ ĊĠĠĠĠĠĠĠ Ġbinding Ġ= ĠDetail Fragment Binding . inflate ( in flater , Ġcontainer , Ġfalse ) ĊĠĠĠĠĠĠĠ Ġbinding . lifecycle Owner Ġ= Ġview Lifecycle Owner ĊĠĠĠĠĠĠĠ Ġbinding . detail ViewModel Ġ= Ġthis @ Detail Fragment . detail ViewModel ĊĠĠĠĠĠĠĠ Ġinit View () ĊĠĠĠĠĠĠĠ Ġreturn Ġbinding . root ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) ĊĊĠĠĠĠĠĠĠ Ġdetail ViewModel . fetch Data () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Detach () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Detach () ĊĠĠĠĠĠĠĠ Ġhost ViewModel . show Bottom Nav () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġinit View () Ġ{ ĊĊĠĠĠ Ġ} Ċ }