package Ġio . arm cha . ribb le . presentation . adapter Ċ Ċ import Ġandroid . support . v 4 . app . Fragment Ċ import Ġandroid . support . v 4 . app . FragmentManager Ċ import Ġandroid . support . v 4 . app . Fragment Pager Adapter Ċ import Ġio . arm cha . ribb le . di . scope . Per Activity Ċ import Ġio . arm cha . ribb le . presentation . screen . shot . Shot Fragment Ċ import Ġio . arm cha . ribb le . presentation . screen . shot . TYPE _ POP ULAR Ċ import Ġio . arm cha . ribb le . presentation . screen . shot . TYPE _ REC ENT Ċ import Ġjavax . inject . Inject Ċ Ċ /** Ċ Ġ* ĠCreated Ġby ĠChat ik yan Ġon Ġ 0 6 . 0 8 . 2 0 1 7 . Ċ Ġ*/ Ċ @ Per Activity Ċ class ĠShot Pager Adapter Ġ@ Inject Ġconstructor ( fragment Manager : ĠFragment Manager ) Ġ: ĠFragment Pager Adapter ( fragment Manager ) Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġtitles Ġ= ĠlistOf (" Pop ular ", Ġ" Recent ") ĊĊĠĠĠ Ġoverride Ġfun ĠgetItem ( position : ĠInt ): ĠFragment Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġif Ġ( position Ġ== Ġ 0 ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠShot Fragment . newInstance ( TYPE _ POP ULAR ) ĊĠĠĠĠĠĠĠ Ġelse ĊĠĠĠĠĠĠĠĠĠĠĠ ĠShot Fragment . newInstance ( TYPE _ REC ENT ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġget Count (): ĠInt Ġ= Ġtitles . count () ĊĊĠĠĠ Ġoverride Ġfun Ġget Page Title ( position : ĠInt ) Ġ= Ġtitles [ position ] Ċ }