package Ġcom . pr ush . just another player . ui . album details Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . MenuItem Ċ import Ġcom . pr ush . just another player . R Ċ import Ġcom . pr ush . just another player . base . Base Now Playing Activity Ċ import Ġcom . pr ush . just another player . ui . album details . Album Details Fragment . Companion . AL BU M _ ID Ċ Ċ class ĠAlbum Details Activity Ġ: ĠBase Now Playing Activity () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġget Layout ResourceId (): ĠInt Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠR . layout . now _ playing _ footer _ with _ container _ layout ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( savedInstanceState ) ĊĊĠĠĠĠĠĠĠ Ġval Ġalbum Id Ġ= Ġintent . getLong Extra ( AL BU M _ ID , Ġ 0 ) ĊĊĠĠĠĠĠĠĠ Ġval Ġalbum Details Fragment Ġ= Ġsupport FragmentManager . find Fragment ById ( R . id . container ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġas ĠAlbum Details Fragment ? Ġ?: ĠAlbum Details Fragment . newInstance ( album Id ) ĊĊĠĠĠĠĠĠĠ Ġsupport FragmentManager . beginTransaction (). apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreplace ( R . id . container , Ġalbum Details Fragment ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcommit () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Options ItemSelected ( item : ĠMenuItem ): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġwhen Ġ( item . itemId ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġandroid . R . id . home Ġ-> Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġsuper . on Back Pressed () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn Ġsuper . on Options ItemSelected ( item ) ĊĠĠĠ Ġ} Ċ Ċ }