package Ġcom . example . ch uc ulture . adapter Ċ Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroidx . fragment . app . Fragment Activity Ċ import Ġandroidx . view pager 2 . adapter . Fragment State Adapter Ċ import Ġcom . example . ch uc ulture . fragment . Image Text Fragment Ċ import Ġcom . example . ch uc ulture . fragment . Video Fragment Ċ Ċ class ĠFragment Adapter ( fragment Activity : ĠFragment Activity ) Ġ: ĠFragment State Adapter ( fragment Activity ) Ġ{ ĊĠĠĠ Ġoverride Ġfun ĠgetItem Count () = 2 ĊĊĠĠĠ Ġoverride Ġfun Ġcreate Fragment ( position : ĠInt ): ĠFragment Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġif Ġ( position == 0 ) ĠImage Text Fragment () ĊĠĠĠĠĠĠĠ Ġelse ĠVideo Fragment () ĊĠĠĠ Ġ} Ċ }