package Ġcom . re cr sn . card track . ui . cards Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġcom . re cr sn . card track . R Ċ import Ġorg . k oin . android x . view model . ext . android . viewModel Ċ import Ġorg . k oin . core . parameter . parameters Of Ċ Ċ class ĠCard Transactions Activity Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġconst Ġval ĠARG _ CARD _ ID Ġ= Ġ" CARD _ ID " ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġval Ġcard Transactions ViewModel : ĠCard Transactions ViewModel Ġby ĠviewModel Ġ{ ĊĠĠĠĠĠĠĠ Ġparameters Of ( this . intent . extras !!. getInt ( ARG _ CARD _ ID )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . activity _ card _ transactions ) ĊĊĠĠĠĠĠĠĠ Ġaction Bar ?. set Display Home As Up Enabled ( true ) ĊĊĠĠĠĠĠĠĠ Ġval Ġtransaction List : ĠRecyclerView Ġ= ĠfindViewById ( R . id . transaction _ list ) ĊĠĠĠĠĠĠĠ Ġval Ġadapter Ġ= ĠCard Transaction ListAdapter ( this ) ĊĠĠĠĠĠĠĠ Ġtransaction List . adapter Ġ= Ġadapter ĊĠĠĠĠĠĠĠ Ġtransaction List . layout Manager Ġ= ĠLinearLayoutManager ( this ) ĊĊĠĠĠĠĠĠĠ Ġcard Transactions ViewModel . transactions . observe ( this , Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit ?. let Ġ{ Ġadapter . set Transactions ( it ) Ġ} ĊĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠ Ġ} Ċ } Ċ