package Ġcom . km man ia . running user preferences . main Ċ Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . Menu Ċ import Ġandroidx . navigation . find Nav Controller Ċ import Ġandroidx . navigation . ui . AppBar Configuration Ċ import Ġandroidx . navigation . ui . navigate Up Ċ import Ġandroidx . navigation . ui . setup ActionBar With Nav Controller Ċ import Ġandroidx . navigation . ui . setup With Nav Controller Ċ import Ġcom . km man ia . running user preferences . R Ċ import Ġcom . km man ia . running user preferences . databinding . Activity Main Binding Ċ import Ġdagger . h ilt . android . Android EntryPoint Ċ Ċ @ Android EntryPoint Ċ class ĠMainActivity Ġ: ĠAppCompatActivity () Ġ{ ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġmain Binding : ĠActivity Main Binding ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġapp Bar Configuration : ĠApp Bar Configuration ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ Ġmain Binding Ġ= ĠActivity Main Binding . inflate ( layout Inflater ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( main Binding . root ) ĊĊĠĠĠĠĠĠĠ Ġval Ġdrawer Layout Ġ= Ġmain Binding . drawer Layout ĊĠĠĠĠĠĠĠ Ġval Ġnav View Ġ= Ġmain Binding . nav View ĊĠĠĠĠĠĠĠ Ġval Ġnav Controller Ġ= Ġfind Nav Controller ( R . id . nav _ host _ fragment _ container ) ĊĊĠĠĠĠĠĠĠ Ġapp Bar Configuration Ġ= ĠApp Bar Configuration ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Of ( R . id . nav _ home , ĠR . id . nav _ user _ prefs , ĠR . id . nav _ info ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdrawer Layout ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġsetup ActionBar With Nav Controller ( nav Controller , Ġapp Bar Configuration ) ĊĠĠĠĠĠĠĠ Ġnav View . setup With Nav Controller ( nav Controller ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate Options Menu ( menu : ĠMenu ?): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġmenu Inflater . inflate ( R . menu . main , Ġmenu ) ĊĠĠĠĠĠĠĠ Ġreturn Ġsuper . onCreate Options Menu ( menu ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Support Navigate Up (): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġnav Controller Ġ= Ġfind Nav Controller ( R . id . nav _ host _ fragment _ container ) ĊĠĠĠĠĠĠĠ Ġreturn Ġnav Controller . navigate Up ( app Bar Configuration ) Ġ|| Ġsuper . on Support Navigate Up () ĊĠĠĠ Ġ} Ċ }