package Ġcom . ud in dev . s ade . activity Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager Ċ import Ġcom . ud in dev . s ade . R Ċ import Ġcom . ud in dev . s ade . adapter . Kont en P us at B ant uan Ċ import Ġcom . ud in dev . s ade . adapter . P us at B ant uan Adapter Ċ import Ġcom . ud in dev . s ade . model . P us at B ant uan Ċ import Ġkotlinx . android . synt hetic . main . activity _ pus at _ b ant uan .* Ċ Ċ class ĠP us at B ant uan Activity Ġ: ĠAppCompatActivity () Ġ{ ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġadapter Ġ: ĠP us at B ant uan Adapter ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . activity _ pus at _ b ant uan ) ĊĊĠĠĠĠĠĠĠ Ġval Ġall P us at B ant uan Ġ: ĠArrayList < P us at B ant uan > Ġ= Ġarray ListOf () ĊĊĠĠĠĠĠĠĠ Ġadd Data ( all P us at B ant uan ) ĊĊĠĠĠĠĠĠĠ Ġadapter Ġ= ĠP us at B ant uan Adapter ( all P us at B ant uan ) ĊĠĠĠĠĠĠĠĠĊĠĠĠĠĠĠĠ Ġrv _ pus at _ b ant uan . adapter Ġ= Ġadapter ĊĠĠĠĠĠĠĠ Ġinit Rec View () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġadd Data ( all P us at B ant uan : Ġjava . util . ArrayList < P us at B ant uan >) Ġ{ ĊĠĠĠĠĠĠĠ Ġfor Ġ( item Ġin Ġ 0 .. Kont en P us at B ant uan . judul P us at B ant uan . size Ġ- Ġ 1 ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġn ama Ġ= ĠKont en P us at B ant uan . judul P us at B ant uan [ item ] ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġde sk ripsi Ġ= ĠKont en P us at B ant uan . desk ripsi P us at B ant uan [ item ] ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġp us at B ant uan Ġ= ĠP us at B ant uan ( nama , Ġde sk ripsi ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġall P us at B ant uan . add ( pus at B ant uan ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġinit Rec View () Ġ{ ĊĠĠĠĠĠĠĠ Ġrv _ pus at _ b ant uan . layout Manager Ġ= ĠLinearLayoutManager ( this ) ĊĠĠĠĠĠĠĠ Ġrv _ pus at _ b ant uan . set Has Fixed Size ( true ) ĊĠĠĠĠĠĠĠ Ġadapter . notify DataSet Changed () ĊĠĠĠ Ġ} Ċ }