package Ġuk . co . apply logic . mod ular ization . feature _ a . ui . feature _ a Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . databinding . Data Binding Util Ċ import Ġandroidx . lifecycle . ViewModel Provider Ċ import Ġuk . co . apply logic . mod ular ization . feature _ a . Feature A Activity Ċ import Ġuk . co . apply logic . mod ular ization . feature _ a . R Ċ import Ġuk . co . apply logic . mod ular ization . feature _ a . databinding . Feature A Fragment Binding Ċ Ċ class ĠFeature A Fragment Ġ: ĠFragment () Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar ĠviewModel : ĠFeature A ViewModel ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġbinding : ĠFeature A Fragment Binding ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( ĊĠĠĠĠĠĠĠ Ġinflater : ĠLayoutInflater , ĊĠĠĠĠĠĠĠ Ġcontainer : ĠViewGroup ?, ĊĠĠĠĠĠĠĠ ĠsavedInstanceState : ĠBundle ? ĊĠĠĠ Ġ): ĠView ? Ġ{ ĊĠĠĠĠĠĠĠ Ġbinding Ġ= ĠData Binding Util . inflate ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġinflater , ĠR . layout . feature _ a _ fragment , Ġcontainer , Ġfalse ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġreturn Ġbinding . root ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Activity Created ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Activity Created ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠviewModel Ġ= ĠViewModel Provider ( this ). get ( Feature A ViewModel :: class . java ) ĊĊĠĠĠĠĠĠĠ Ġbinding . lifecycle Owner Ġ= Ġthis ĊĠĠĠĠĠĠĠ Ġbinding . activity Ġ= Ġactivity Ġas ĠFeature A Activity ĊĠĠĠĠĠĠĠ Ġbinding . fragment Ġ= Ġthis ĊĠĠĠĠĠĠĠ Ġbinding . viewModel Ġ= ĠviewModel ĊĠĠĠ Ġ} Ċ } Ċ