package Ġcom . spital iere . mar vel characters . presentation . ui . characters Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . Intent Ċ import Ġandroidx . navigation . Nav Controller Ċ import Ġandroidx . navigation . find Nav Controller Ċ import Ġandroidx . navigation . ui . Navigation UI Ċ import Ġcom . spital iere . mar vel characters . R Ċ import Ġcom . spital iere . mar vel characters . databinding . Activity Main Binding Ċ import Ġcom . spital iere . mar vel characters . presentation . platform . base . Base Activity Ċ import Ġcom . spital iere . mar vel characters . presentation . platform . extension . animate Move Ċ import Ġcom . spital iere . mar vel characters . presentation . platform . extension . visible Ċ import Ġorg . k oin . android x . view model . ext . android . viewModel Ċ Ċ class ĠMainActivity Ġ: ĠBase Activity < Main ViewModel , ĠActivity Main Binding >() Ġ{ ĊĊĠĠĠ Ġoverride Ġval ĠviewModel : ĠMain ViewModel Ġby ĠviewModel () ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġnavigation Controller Ġ: ĠNav Controller ĊĊĠĠĠ Ġoverride Ġfun Ġget Layout (): ĠInt Ġ= ĠR . layout . activity _ main ĊĊĠĠĠ Ġoverride Ġfun Ġshow Back Button (): ĠBoolean Ġ= Ġfalse ĊĊĠĠĠ Ġoverride Ġfun Ġget Toolbar Title (): ĠString Ġ= ĠgetString ( R . string . app _ name ) ĊĊĠĠĠ Ġoverride Ġfun Ġsetup View () Ġ{ ĊĠĠĠĠĠĠĠ Ġnavigation Controller Ġ= Ġfind Nav Controller ( R . id . fragment Nav Host ) ĊĠĠĠĠĠĠĠ ĠNavigation UI . setup ActionBar With Nav Controller ( this , Ġnavigation Controller ) ĊĊĠĠĠĠĠĠĠ Ġbinding . animation View . animate Move ( y = Ġ- 5 0 0 f , Ġrunnable Ġ= Ġ ĠRunnable Ġ{ Ġbinding . animation View . visible ( false ) Ġ}) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Support Navigate Up (): ĠBoolean Ġ= Ġnavigation Controller . navigate Up () ĊĊĠĠĠ Ġcompanion Ġobject { ĊĠĠĠĠĠĠĠ Ġfun Ġget Intent ( context : ĠContext ) Ġ: ĠIntent Ġ= ĠIntent ( context , ĠMainActivity :: class . java Ġ) ĊĠĠĠ Ġ} Ċ Ċ }