package Ġcom . github . cut away _ inc . cut away Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . navigation . find Nav Controller Ċ import Ġandroidx . navigation . ui . setup With Nav Controller Ċ import Ġcom . github . cut away _ inc . cut away . databinding . Activity Main Binding Ċ import Ġcom . google . android . material . bottomnavigation . Bottom Navigation View Ċ Ċ class ĠMainActivity Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġbinding : ĠActivity Main Binding ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĊĠĠĠĠĠĠĠ Ġbinding Ġ= ĠActivity Main Binding . inflate ( layout Inflater ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( binding . root ) ĊĊĠĠĠĠĠĠĠ Ġval Ġnav View : ĠBottom Navigation View Ġ= Ġbinding . nav View ĊĊĠĠĠĠĠĠĠ Ġval Ġnav Controller Ġ= Ġfind Nav Controller ( R . id . nav _ host _ fragment _ activity _ main ) ĊĠĠĠĠĠĠĠ Ġnav View . setup With Nav Controller ( nav Controller ) ĊĠĠĠ Ġ} Ċ }