package Ġcom . l avi ola . b att ler item irror . ui . home Ċ Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . navigation . Navigation Ċ import Ġandroidx . navigation . fragment . Nav Host Fragment Ċ import Ġandroidx . navigation . ui . Navigation UI Ċ import Ġcom . l avi ola . b att ler item irror . R Ċ import Ġkotlinx . android . synt hetic . main . home _ activity .* Ċ Ċ class ĠHome Activity Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . home _ activity ) ĊĠĠĠĠĠĠĠ Ġset Support ActionBar ( toolbar ) ĊĠĠĠĠĠĠĠ Ġval Ġhost Ġ= Ġsupport FragmentManager . find Fragment ById ( R . id . my Fragment ) Ġas ĠNav Host Fragment ĊĠĠĠĠĠĠĠ Ġval Ġnav Controller Ġ= Ġhost . nav Controller ĊĠĠĠĠĠĠĠ ĠNavigation UI . setup ActionBar With Nav Controller ( this , Ġnav Controller ) ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Support Navigate Up (): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠNavigation . find Nav Controller ( this , ĠR . id . my Fragment ). navigate Up () ĊĠĠĠ Ġ} Ċ Ċ } Ċ