package Ġcom . w yn ne . advanced . jet pack . navigation Ċ Ċ import Ġandroidx . navigation . fragment . Nav Host Fragment Ċ import Ġandroidx . navigation . ui . setup With Nav Controller Ċ import Ġcom . w yn ne . advanced . R Ċ import Ġcom . w yn ne . knowledge . base . base . Base Activity Ċ import Ġkotlinx . android . synt hetic . main . activity _ base _ advanced _ jet pack _ nav ag ation _ main _ layout .* Ċ Ċ class ĠJ at Pack Navigation MainActivity Ġ: ĠBase Activity () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġinit View () Ġ{ ĊĠĠĠĠĠĠĠ Ġtl Bar . title Ġ= Ġ" Navigation Ġ ä¸» é¡µéĿ¢ Demo " ĊĠĠĠĠĠĠĠ Ġval Ġhost : ĠNav Host Fragment Ġ= Ġsupport FragmentManager . find Fragment ById ( R . id . my _ nav _ host _ fragment ) Ġas ĠNav Host Fragment ĊĠĠĠĠĠĠĠ Ġval Ġnav Controller Ġ= Ġhost . nav Controller ĊĠĠĠĠĠĠĠ Ġnavigation _ view . setup With Nav Controller ( nav Controller ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġval Ġlayout Id : ĠInt Ġ= ĠR . layout . activity _ base _ advanced _ jet pack _ nav ag ation _ main _ layout Ċ Ċ }