package Ġcom . example . mov iet op . view Ċ Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . navigation . fragment . Nav Host Fragment Ċ import Ġandroidx . navigation . ui . AppBar Configuration Ċ import Ġandroidx . navigation . ui . setup With Nav Controller Ċ import Ġcom . example . mov iet op . R Ċ import Ġcom . example . mov iet op . databinding . Activity Main Binding Ċ Ċ class ĠMainActivity Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġprivate Ġvar Ġ_ binding : ĠActivity Main Binding ? Ġ= Ġnull ĊĠĠĠ Ġprivate Ġval Ġbinding : ĠActivity Main Binding Ġget () Ġ= Ġ_ binding !! ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĊĠĠĠĠĠĠĠ ĠThread . sleep ( 1 0 0 0 ) ĊĊĠĠĠĠĠĠĠ Ġset Theme ( R . style . Theme _ Movie Top ) ĊĊĠĠĠĠĠĠĠ Ġ_ binding Ġ= ĠActivity Main Binding . inflate ( layout Inflater ) ĊĊĠĠĠĠĠĠĠ Ġ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 ĊĠĠĠĠĠĠĠ Ġval Ġapp Bar Configuration Ġ= ĠApp Bar Configuration ( nav Controller . graph ) ĊĠĠĠĠĠĠĠ Ġbinding . app Toolbar . setup With Nav Controller ( nav Controller , Ġapp Bar Configuration ) ĊĠĠĠĠĠĠĠ Ġbinding . bottom Navigation . setup With Nav Controller ( nav Controller ) ĊĊĠĠĠĠĠĠĠ ĠsetContentView ( binding . root ) ĊĠĠĠ Ġ} Ċ Ċ }