package Ġsite . yo ons ang . covid now . view Ċ Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . databinding . Data Binding Util Ċ import Ġandroidx . navigation . Nav Controller Ċ import Ġandroidx . navigation . fragment . find Nav Controller Ċ import Ġandroidx . navigation . ui . setup With Nav Controller Ċ import Ġdagger . h ilt . android . Android EntryPoint Ċ import Ġsite . yo ons ang . covid now . R Ċ import Ġsite . yo ons ang . covid now . databinding . Activity Main Binding Ċ Ċ @ Android EntryPoint Ċ class ĠMainActivity Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġbinding : ĠActivity Main Binding ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġnav Controller : ĠNav Controller ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ Ġbinding Ġ= ĠData Binding Util . set ContentView ( this , ĠR . layout . activity _ main ) ĊĊĠĠĠĠĠĠĠ Ġset Support ActionBar ( binding . main ToolBar ) ĊĠĠĠĠĠĠĠ Ġsupport ActionBar ?. title Ġ= Ġnull ĊĊĠĠĠĠĠĠĠ Ġval Ġnav Host Fragment Ġ= Ġsupport FragmentManager . find Fragment ById ( R . id . main _ nav _ host _ fragment ) ĊĠĠĠĠĠĠĠ Ġnav Controller Ġ= Ġnav Host Fragment !!. find Nav Controller () ĊĊĠĠĠĠĠĠĠ Ġbinding . main Bottom Nav . setup With Nav Controller ( nav Controller ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Support Navigate Up (): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnav Controller . navigate Up () Ġ|| Ġsuper . on Support Navigate Up () ĊĠĠĠ Ġ} Ċ }