package Ġnam . tran . android . helper . view . splash Ċ Ċ import Ġandroid . content . Intent Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . lifecycle . ViewModel Providers Ċ import Ġnam . tran . android . helper . R Ċ import Ġnam . tran . android . helper . databinding . Activity Splash Binding Ċ import Ġnam . tran . android . helper . view . main . MainActivity Ċ import Ġnam . tran . android . helper . view . splash . view model . IS pl ash ViewModel Ċ import Ġnam . tran . android . helper . view . splash . view model . Splash ViewModel Ċ import Ġtran . nam . core . view . mv vm . Base Activity MV VM Ċ Ċ class ĠSpl ash Activity Ġ: ĠBase Activity MV VM < Activity Splash Binding , ĠSpl ash ViewModel >(), ĠIS pl ash ViewModel Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġlayout Id (): ĠInt Ġ{ ĊĠĠĠĠĠĠĠ Ġm ViewModel Ġ= ĠViewModel Providers . of ( this , Ġm ViewModel Factory ). get ( Splash ViewModel :: class . java ) ĊĠĠĠĠĠĠĠ Ġreturn ĠR . layout . activity _ splash ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġvar Ġrunnable Ġ= ĠRunnable Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġintent Ġ= ĠIntent ( this , ĠMainActivity :: class . java ) ĊĠĠĠĠĠĠĠ Ġintent . putExtra (" is Login ", m ViewModel ?. is Login ()) ĊĠĠĠĠĠĠĠ ĠstartActivity ( intent ) ĊĠĠĠĠĠĠĠ Ġfinish () ĊĠĠĠĠĠĠĠ Ġoverride Pending Transition ( tran . nam . core . R . anim . slide _ right _ in , Ġtran . nam . core . R . anim . slide _ left _ out ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġinit ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġm ViewData Binding . image . post Delayed ( run nable , Ġ 2 0 0 0 ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Destroy () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Destroy () ĊĠĠĠĠĠĠĠ Ġm ViewData Binding . image . remove Callbacks ( run nable ) ĊĠĠĠ Ġ} Ċ } Ċ