package Ġcom . bug sn ag . example . kotlin mp Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . View Ċ import Ġandroid . widget . Toast Ċ import Ġcom . bug sn ag . example . kotlin mp . R Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroidx . recyclerview . widget . Divider Item Decoration Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager Ċ import Ġkotlinx . android . synt hetic . main . activity _ language _ list . list RecyclerView Ċ Ċ class ĠLanguage List Activity Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġadapter : ĠLanguage ListAdapter ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . activity _ language _ list ) ĊĠĠĠĠĠĠĠ Ġtitle Ġ= Ġplatform Message () ĊĊĠĠĠĠĠĠĠ Ġval Ġlanguage Fact s Ġ= ĠLanguage Fact Repository (). fetch Language Fact s () ĊĊĠĠĠĠĠĠĠ Ġadapter Ġ= ĠLanguage ListAdapter ( language Fact s , ĠView . OnClickListener Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġposition Ġ= Ġlist RecyclerView !!. getChild Adapter Position ( it ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġitem Ġ= Ġadapter . getItem ( position ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠToast . makeText ( this , Ġitem . description , ĠToast . LENGTH _ LONG ). show () ĊĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠĠĠĠĠ Ġlist RecyclerView . layout Manager Ġ= ĠLinearLayoutManager ( this ) ĊĠĠĠĠĠĠĠ Ġlist RecyclerView . set Has Fixed Size ( true ) ĊĠĠĠĠĠĠĠ Ġlist RecyclerView . adapter Ġ= Ġadapter ĊĊĠĠĠĠĠĠĠ Ġval Ġdecoration Ġ= ĠDiv ider Item Decoration ( this , ĠDiv ider Item Decoration . VERTICAL ) ĊĠĠĠĠĠĠĠ Ġlist RecyclerView . addItem Decoration ( decoration ) ĊĠĠĠ Ġ} Ċ Ċ } Ċ