package Ġcom . jint in . recyclerview sample Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager Ċ import Ġcom . jint in . recyclerview sample . databinding . Activity Main Binding Ċ Ċ class ĠMainActivity Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ Ġval Ġbinding Ġ= ĠActivity Main Binding . inflate ( layout Inflater ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( binding . root ) ĊĊĠĠĠĠĠĠĠ Ġval Ġadapter Ġ= ĠMy Adapter () ĊĠĠĠĠĠĠĠ Ġbinding . re cyclerView . layout Manager Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠLinearLayoutManager ( this , ĠLinearLayoutManager . VERTICAL , Ġfalse ) ĊĠĠĠĠĠĠĠ Ġbinding . re cyclerView . adapter Ġ= Ġadapter ĊĠĠĠĠĠĠĠ Ġadapter . setData ( gen Data ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġgen Data () Ġ= Ġ( 0 .. 1 0 0 ). map Ġ{ ĊĠĠĠĠĠĠĠ ĠMy Data ( it . toString ()) ĊĠĠĠ Ġ} Ċ }