package Ġcom . s ah ar w . my music player . presentation . fragments . albums . mvp Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . support . v 4 . app . Fragment Ċ import Ġandroid . util . Log Ċ import Ġandroid . view . View Ċ import Ġandroid . widget . GridView Ċ import Ġcom . s ah ar w . my music player . R Ċ import Ġcom . s ah ar w . my music player . entities . adapters . My GridView Adapter Ċ import Ġcom . s ah ar w . my music player . entities . data . Complex Media Item Ċ import Ġcom . s ah ar w . my music player . presentation . base . I View Ċ Ċ /** Ċ Ġ* ĠCreated Ġby Ġs ah ar w Ġon Ġ 0 9 / 0 5 / 2 0 1 8 . Ċ Ġ*/ Ċ class ĠAlbum s View ( private Ġval Ġfragment Album s : ĠFragment ) Ġ: ĠI View Ġ{ ĊĊĠĠĠ Ġprivate Ġval ĠTAG Ġ= Ġ" Album s View " ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġm Album s View Ġ: ĠGrid View ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġm Album s Adapter Ġ: ĠMy GridView Adapter ĊĊĠĠĠ Ġoverride Ġfun Ġon View Create () Ġ{ ĊĠĠĠĠĠĠĠ ĠLog . d ( TAG , Ġ" on View Create ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon View Resume () Ġ{ ĊĠĠĠĠĠĠĠ ĠLog . d ( TAG , Ġ" on View Resume ") ĊĠĠĠĠĠĠĠ Ġif ( fragment Album s . view Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġinit UI Components ( fragment Album s . view !! ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon View Pause () Ġ{ ĊĠĠĠĠĠĠĠ ĠLog . d ( TAG , Ġ" on View Pause ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon View Destroy () Ġ{ ĊĠĠĠĠĠĠĠ ĠLog . d ( TAG , Ġ" on View Destroy ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġinit UI Components ( view : ĠView ) Ġ{ ĊĠĠĠĠĠĠĠ ĠLog . d ( TAG , Ġ" init UI Components ") ĊĠĠĠĠĠĠĠ Ġm Album s View Ġ= Ġview . findViewById ( R . id . grid View ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġdisplay Album s Data ( albums Data : ĠList < Complex Media Item >, Ġitem Layout Id Ġ: ĠInt , Ġitem OnClickListener : ĠView . OnClickListener ){ ĊĠĠĠĠĠĠĠ Ġm Album s Adapter Ġ= ĠMy GridView Adapter ( fragment Album s . activity , Ġalbum s Data , Ġitem Layout Id , Ġitem OnClickListener ) ĊĠĠĠĠĠĠĠ Ġm Album s View . adapter Ġ= Ġm Album s Adapter ĊĠĠĠĠĠĠĠ Ġm Album s Adapter . notify DataSet Changed () Ġ// Ġredundant ? ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetContext (): ĠContext Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġfragment Album s . context ĊĠĠĠ Ġ} Ċ }