package Ġcom . mult ith read . coco on . base . ui Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . lifecycle . ViewModel Provider Ċ import Ġcom . mult ith read . coco on . base . Base Event Ċ import Ġcom . mult ith read . coco on . base . ViewModel State Ċ import Ġcom . mult ith read . coco on . base . view model . Base Flow ViewModel Ċ import Ġdagger . android . Android Injection Ċ import Ġdagger . android . Android Injector Ċ import Ġdagger . android . Dispatch ing Android Injector Ċ import Ġdagger . android . support . D agger AppCompatActivity Ċ import Ġjavax . inject . Inject Ċ Ċ abstract Ġclass ĠBase Activity < STATE Ġ: ĠViewModel State , ĠEVENT : ĠBase Event , ĠVIEW MODEL Ġ: ĠBase Flow ViewModel < STATE , ĠEVENT >> Ġ: ĊĠĠĠ ĠD agger AppCompatActivity () Ġ{ ĊĊĠĠĠ Ġprotected Ġabstract Ġval Ġcontent ResourceId : ĠInt ĊĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġlateinit Ġvar ĠviewModel Factory : ĠViewModel Provider . Factory ĊĊĠĠĠ Ġval ĠviewModel : ĠVIEW MODEL Ġby Ġlazy Ġ{ ĊĠĠĠĠĠĠĠ ĠviewModel Factory . create ( get ViewModel Class ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġabstract Ġfun Ġget ViewModel Class (): ĠClass < VIEW MODEL > ĊĊĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġlateinit Ġvar Ġandroid Injector : ĠDispatch ing Android Injector < Any > ĊĊĠĠĠ Ġoverride Ġfun Ġandroid Injector (): ĠAndroid Injector < Any > Ġ= Ġandroid Injector ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ ĠAndroid Injection . inject ( this ) ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( content ResourceId ) ĊĠĠĠĠĠĠĠ Ġinit View () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġopen Ġfun Ġinit View () Ġ{} Ċ }