package Ġcom . ir sc . challenge . activities Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . databinding . Data Binding Util Ċ import Ġandroidx . navigation . find Nav Controller Ċ import Ġandroidx . navigation . ui . Navigation UI Ċ import Ġcom . ir sc . challenge . R Ċ import Ġcom . ir sc . challenge . databinding . Activity Main Binding Ċ import Ġdagger . h ilt . android . Android EntryPoint ĊĊ Ċ @ Android EntryPoint Ċ class ĠMainActivity Ġ: ĠAppCompatActivity (){ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġbinding : ĠActivity Main Binding ĊĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĊĠĠĠĠĠĠĠ Ġbinding Ġ= ĠData Binding Util . set ContentView ( this , ĠR . layout . activity _ main ) ĊĊĠĠĠĠĠĠĠ Ġval Ġnav Controller Ġ= Ġthis . find Nav Controller ( R . id . my Nav Host Fragment ) ĊĠĠĠĠĠĠĠ ĠNavigation UI . setup ActionBar With Nav Controller ( this , Ġnav Controller ) ĊĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Support Navigate Up (): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġnav Controller Ġ= Ġthis . find Nav Controller ( R . id . my Nav Host Fragment ) ĊĠĠĠĠĠĠĠ Ġreturn Ġnav Controller . navigate Up () ĊĠĠĠ Ġ} ĊĊĊĊĊ Ċ }