package Ġcom . examples . game list Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġcom . google . android . material . sn ackbar . Snackbar Ċ import Ġandroidx . appcompat . app . AppCompatActivity ; Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġcom . example . list view app . Custom Adapter Ċ Ċ import Ġkotlinx . android . synt hetic . main . activity _ recycler .* Ċ import Ġkotlinx . android . synt hetic . main . content _ recycler .* Ċ Ċ class ĠRe cycler Activity Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġvar Ġarray Games Ġ= Ġarray ListOf (" PS 4 ", Ġ" Switch ", Ġ" PC ", Ġ" PC ĠG amer ", Ġ" PC Ġde Ġlo ja ", Ġ" PS 1 ", Ġ" PS ĠV ita ", Ġ" PS 3 ", Ġ" PS 2 ", ĊĠĠĠĠĠĠĠ Ġ" SN ES ", Ġ" N ES ", Ġ" Me ga ĠDrive ", Ġ" Pol yst ation ", Ġ" Dyn av ision ", Ġ" At ari ", Ġ" Am iga ", Ġ" 3 DO ", Ġ" J ag uar ", Ġ" Neo ĠGeo ", ĊĠĠĠĠĠĠĠ Ġ" N 6 4 ", Ġ" Virtual ĠBo y ", Ġ" W ii ", Ġ" W ii ĠU ") ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . activity _ recycler ) ĊĠĠĠĠĠĠĠ Ġset Support ActionBar ( toolbar ) ĊĊĠĠĠĠĠĠĠ Ġfab . setOnClickListener Ġ{ Ġview Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSn ackbar . make ( view , Ġ" Replace Ġwith Ġyour Ġown Ġaction ", ĠSn ackbar . LENGTH _ LONG ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. setAction (" Action ", Ġnull ). show () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġsupport ActionBar ?. set Display Home As Up Enabled ( true ) ĊĠĠĠĠĠĠĠ Ġvar Ġadapter Ġ= ĠCustom Adapter ( base Context , Ġarray Games Ġ) ĊĠĠĠĠĠĠĠ Ġre cycler . adapter Ġ= Ġadapter ĊĠĠĠĠĠĠĠ Ġre cycler . layout Manager Ġ= ĠLinearLayoutManager ( base Context , ĠRecyclerView . VERTICAL , Ġfalse ) ĊĠĠĠ Ġ} Ċ Ċ } Ċ