package Ġcom . soft 5 0 7 . travel suggest . activity Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . recyclerview . widget . Grid LayoutManager Ċ import Ġcom . soft 5 0 7 . travel suggest . R Ċ import Ġcom . soft 5 0 7 . travel suggest . User Like Ċ import Ġcom . soft 5 0 7 . travel suggest . adapter . Collect Play Adapter Ċ import Ġcom . soft 5 0 7 . travel suggest . base . Base Activity Ċ import Ġcom . soft 5 0 7 . travel suggest . bean . Collect Play Bean Ċ import Ġcom . soft 5 0 7 . travel suggest . databinding . Activity Collect Binding Ċ Ċ class ĠCollect Activity Ġ: ĠBase Activity < Activity Collect Binding >() Ġ{ ĊĊĊĠĠĠ Ġprivate Ġvar Ġdata Ġ= Ġarray ListOf < Collect Play Bean >() ĊĊĠĠĠ Ġprivate Ġvar Ġadapter : ĠCollect Play Adapter ? Ġ= Ġnull ĊĊĠĠĠ Ġoverride Ġfun Ġinit Work ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġset Support ActionBar ( m Data Binding . collect Toolbar ) ĊĠĠĠĠĠĠĠ Ġsupport ActionBar !!. set Display Show Home Enabled ( true ) ĊĠĠĠĠĠĠĠ Ġsupport ActionBar !!. set Home Button Enabled ( true ) ĊĠĠĠĠĠĠĠ Ġsupport ActionBar !!. set Display Show Title Enabled ( false ) ĊĠĠĠĠĠĠĠ Ġm Data Binding . collect Toolbar . navigation Icon Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġresources . get Drawable ( R . mip map . ic _ left _ small _ arrow ) ĊĠĠĠĠĠĠĠ Ġm Data Binding . collect Toolbar . set Navigation OnClickListener Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfinish () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġdata . clear () ĊĠĠĠĠĠĠĠ ĠUser Like . data . forEach Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdata . add ( Collect Play Bean ( it . sc _ vide on ame , Ġit . sc _ video count )) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġadapter Ġ= ĠCollect Play Adapter ( R . layout . collect _ ry _ layout , Ġdata ) ĊĠĠĠĠĠĠĠ Ġm Data Binding . collect Ry . layout Manager Ġ= ĠGrid LayoutManager ( this , Ġ 3 ) ĊĠĠĠĠĠĠĠ Ġm Data Binding . collect Ry . adapter Ġ= Ġadapter ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġget Layout Res () Ġ= ĠR . layout . activity _ collect Ċ } ĊĊ