package Ġcom . github . am atk iv sk iy . template . presentation . ui Ċ Ċ import Ġactivity starter . Activity Starter Ċ import Ġandroid . app . Activity Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . support . annotation . Nullable Ċ import Ġandroid . support . v 4 . app . Fragment Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . ViewGroup Ċ import Ġcom . github . am atk iv sk iy . template . presentation . App Ċ import Ġcom . github . am atk iv sk iy . template . presentation . d agger . component . Presenter Component Ċ import Ġcom . h ann es dor fm ann . mos by 3 . mvp . M vp Presenter Ċ import Ġcom . h ann es dor fm ann . mos by 3 . mvp . M vp View Ċ import Ġcom . h ann es dor fm ann . mos by 3 . mvp . delegate . Fragment M vp Delegate Ċ import Ġcom . h ann es dor fm ann . mos by 3 . mvp . delegate . Fragment M vp Delegate Impl Ċ import Ġcom . h ann es dor fm ann . mos by 3 . mvp . delegate . M vp Delegate Callback Ċ import Ġjavax . inject . Inject Ċ Ċ abstract Ġclass ĠBase D agger M vp Fragment < View Ġ: ĠM vp View , ĠPres enter Ġ: ĠM vp Presenter < View >> Ġ: ĠFragment (), ĠM vp View , ĠM vp Delegate Callback < View , ĠPres enter > Ġ{ ĊĠĠĠ Ġprivate Ġval Ġm vp Delegate : ĠFragment M vp Delegate < *, Ġ*> Ġby Ġlazy Ġ{ ĊĠĠĠĠĠĠĠ ĠFragment M vp Delegate Impl ( this , Ġthis , Ġtrue , Ġtrue ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġlateinit Ġvar Ġinternal Presenter : ĠPres enter ĊĊĠĠĠ Ġabstract Ġfun Ġcreate Presenter ( presenter Component : ĠPres enter Component ): ĠPres enter ĊĊĠĠĠ Ġabstract Ġval Ġview ResourceId : ĠInt ĊĊĠĠĠ Ġoverride Ġfun Ġget Presenter (): ĠPres enter Ġ= Ġinternal Presenter ĊĊĠĠĠ Ġoverride Ġfun Ġset Presenter ( presenter : ĠPres enter ) Ġ{ ĊĠĠĠĠĠĠĠ Ġthis . internal Presenter Ġ= Ġpresenter ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Suppress (" UN CHECK ED _ CAST ") ĊĠĠĠ Ġoverride Ġfun Ġget M vp View (): ĠView Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġthis Ġas ĠView ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( in flater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ?, ĠsavedInstanceState : ĠBundle ?): Ġandroid . view . View ? Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġroot View Ġ= Ġinflater . inflate ( view ResourceId , Ġcontainer , Ġfalse ) ĊĠĠĠĠĠĠĠ ĠActivity Starter . fill ( this , ĠsavedInstanceState ) ĊĠĠĠĠĠĠĠ Ġreturn Ġroot View ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( fragment View : Ġandroid . view . View , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( fragment View , ĠsavedInstanceState ) ĊĠĠĠĠĠĠĠ Ġm vp Delegate . on View Created ( fragment View , ĠsavedInstanceState ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Destroy View () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Destroy View () ĊĠĠĠĠĠĠĠ Ġm vp Delegate . on Destroy View () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĊĠĠĠĠĠĠĠ ĠActivity Starter . fill ( this , ĠsavedInstanceState ) ĊĊĠĠĠĠĠĠĠ Ġm vp Delegate . onCreate ( savedInstanceState ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Destroy () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Destroy () ĊĠĠĠĠĠĠĠ Ġm vp Delegate . on Destroy () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Pause () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Pause () ĊĠĠĠĠĠĠĠ Ġm vp Delegate . on Pause () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Resume () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Resume () ĊĠĠĠĠĠĠĠ Ġm vp Delegate . on Resume () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonStart () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onStart () ĊĠĠĠĠĠĠĠ Ġm vp Delegate . onStart () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Stop () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Stop () ĊĠĠĠĠĠĠĠ Ġm vp Delegate . on Stop () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Activity Created (@ Nullable ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Activity Created ( savedInstanceState ) ĊĠĠĠĠĠĠĠ Ġm vp Delegate . on Activity Created ( savedInstanceState ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Suppress (" Over riding Deprecated Member ", Ġ" DE PREC ATION ") ĊĠĠĠ Ġoverride Ġfun Ġon Attach ( activity : ĠActivity ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Attach ( activity ) ĊĠĠĠĠĠĠĠ Ġm vp Delegate . on Attach ( activity ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Detach () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Detach () ĊĠĠĠĠĠĠĠ Ġm vp Delegate . on Detach () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Save InstanceState ( out State : ĠBundle ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Save InstanceState ( out State ) ĊĠĠĠĠĠĠĠ Ġm vp Delegate . on Save InstanceState ( out State ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠCreates Ġa Ġnew Ġpresenter Ġinstance , Ġif Ġneeded . ĠWill Ġreuse Ġthe Ġprevious Ġpresenter Ġinstance Ġif ĊĠĠĠĠ Ġ* Ġ[. set Ret ain Instance ] Ġis Ġset Ġto Ġtrue . ĠThis Ġmethod Ġwill Ġbe Ġcalled Ġfrom ĊĠĠĠĠ Ġ* Ġ[. on View Created ] ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġoverride Ġfun Ġcreate Presenter (): ĠPres enter Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġcreate Presenter ( get Presenter Component ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġget Presenter Component (): ĠPres enter Component Ġ= ĠApp . get Presenter Component ( require Context ()) Ċ } Ċ