package Ġxyz . code ge ek . out break visual izer Ċ Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . navigation . Nav Controller Ċ import Ġandroidx . navigation . find Nav Controller Ċ import Ġandroidx . navigation . ui . setup With Nav Controller Ċ import Ġkotlinx . android . synt hetic . main . activity _ main .* Ċ import Ġxyz . code ge ek . out break visual izer . databinding . Activity Main Binding ĊĊ Ċ 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 Ġ= ĠActivity Main Binding . inflate ( layout Inflater ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( binding . root ) ĊĠĠĠĠĠĠĠ Ġnav Controller Ġ= Ġfind Nav Controller ( R . id . nav _ host _ fragment ) ĊĠĠĠĠĠĠĠ Ġbottom Navigation View . setup With Nav Controller ( nav Controller ) ĊĠĠĠ Ġ} ĊĊ Ċ } Ċ