package Ġdev . z ur bae vi . news . ui . view . activity Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . navigation . fragment . Nav Host Fragment Ċ import Ġandroidx . navigation . ui . setup With Nav Controller Ċ import Ġdev . z ur bae vi . news . R Ċ import Ġdev . z ur bae vi . news . databinding . Activity News Binding Ċ Ċ class ĠNews Activity Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġbinding : ĠActivity News Binding ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ Ġbinding Ġ= ĠActivity News Binding . inflate ( layout Inflater ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( binding . root ) ĊĊĠĠĠĠĠĠĠ Ġval Ġnav Host Fragment Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsupport FragmentManager . find Fragment ById ( R . id . fragment Container View ) Ġas ĠNav Host Fragment ĊĠĠĠĠĠĠĠ Ġval Ġnav Controller Ġ= Ġnav Host Fragment . nav Controller ĊĊĠĠĠĠĠĠĠ Ġbinding . bottom Navigation View . setup With Nav Controller ( nav Controller ) ĊĠĠĠ Ġ} Ċ Ċ }