package Ġcom . asan are bel . android . ui . detail Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . MenuItem Ċ import Ġcom . asan are bel . android . R Ċ import Ġcom . asan are bel . android . data . model . search . Repo Item Ċ import Ġcom . asan are bel . android . data . model . subscribers . Subscriber Response Ċ import Ġcom . asan are bel . android . ui . base . Base Activity Ċ import Ġkotlinx . android . synt hetic . main . activity _ repository _ detail .* Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠRepository Detail Activity Ġ: ĠBase Activity (), ĠRepository Detail M vp View Ġ{ ĊĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġlateinit Ġvar Ġm Repository Detail M vp Presenter : ĠRepository Detail M vp Presenter < Repository Detail M vp View > ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . activity _ repository _ detail ) ĊĊĠĠĠĠĠĠĠ Ġset Support ActionBar ( toolbar ) ĊĠĠĠĠĠĠĠ Ġsupport ActionBar ?. set Display Show Title Enabled ( false ) ĊĊĠĠĠĠĠĠĠ Ġsupport ActionBar ?. set Home Button Enabled ( true ) ĊĠĠĠĠĠĠĠ Ġsupport ActionBar ?. set Display Home As Up Enabled ( true ) ĊĊĠĠĠĠĠĠĠ Ġval Ġrepo Ġ= Ġintent . get Bundle Extra (" my Bundle "). get Parcelable < Repo Item >(" repo Item ") Ġas ĠRepo Item ĊĊĠĠĠĠĠĠĠ Ġ// Ġset Ġthe Ġtitle Ġof Ġthe Ġtoolbar ĊĠĠĠĠĠĠĠ Ġtoolbar _ title . text Ġ= Ġrepo . name ĊĊĠĠĠĠĠĠĠ Ġm Repository Detail M vp Presenter . on Attach ( this ) ĊĊĠĠĠĠĠĠĠ Ġm Repository Detail M vp Presenter . on Subscriber Request ( repo . owner ?. login , Ġrepo . name ) ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Options ItemSelected ( item : ĠMenuItem ): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġwhen Ġ( item . itemId ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġandroid . R . id . home Ġ-> Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Back Pressed () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġtrue ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn Ġsuper . on Options ItemSelected ( item ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon F etched Sub scribers ( subscriber Response : ĠList < Subscriber Response >) Ġ{ ĊĠĠĠĠĠĠĠ Ġre cycler _ view _ subscribers . adapter Ġ= ĠRepository Detail Adapter ( subscriber Response ) ĊĠĠĠ Ġ} Ċ Ċ } Ċ