package Ġcom . store maker . scan store Ċ Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . util . Log Ċ import Ġandroidx . navigation . Nav Controller Ċ import Ġandroidx . navigation . Navigation Ċ import Ġandroidx . navigation . find Nav Controller Ċ import Ġandroidx . navigation . fragment . Nav Host Fragment Ċ import Ġandroidx . navigation . ui . Navigation UI Ċ import Ġandroidx . navigation . ui . setup With Nav Controller Ċ import Ġkotlinx . android . synt hetic . main . activity _ home .* Ċ Ċ class ĠHome Activity Ġ: ĠAppCompatActivity () Ġ{ ĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġ// ĠInf late Ġthe Ġlayout Ġfor Ġthis Ġfragment ĊĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . activity _ home ) ĊĊĠĠĠĠĠĠĠ Ġval Ġnav Host Fragment Ġ= Ġsupport FragmentManager . find Fragment ById ( R . id . second Nav Host Fragment ) Ġas ĠNav Host Fragment ĊĠĠĠĠĠĠĠ Ġval Ġnav Controller Ġ= Ġnav Host Fragment . nav Controller ĊĊĊĠĠĠĠĠĠĠ Ġbottom _ nav . setup With Nav Controller ( nav Controller ) ĊĠĠĠĠĠĠĠ ĠsetUp ActionBar ( nav Controller ) ĊĠĠĠ Ġ} ĊĊĊĠĠĠ Ġ// Navigation Ġmethod ĊĠĠĠ Ġprivate Ġfun ĠsetUp ActionBar ( nav Controller : ĠNav Controller ){ ĊĠĠĠĠĠĠĠ ĠNavigation UI . setup ActionBar With Nav Controller ( this , Ġnav Controller , Ġdrawer _ layout ) ĊĠĠĠ Ġ} Ċ }