package Ġcom . de cent studio Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . databinding . Data Binding Util Ċ import Ġcom . de cent studio . adapters . Examples Adapter Ċ import Ġcom . de cent studio . databinding . Activity Main Binding Ċ import Ġcom . de cent studio . models . Example Ċ Ċ class ĠMainActivity Ġ: ĠAppCompatActivity () Ġ{ Ċ ĉ private Ġlateinit Ġvar Ġbinding : ĠActivity Main Binding ĊĊ ĉ override Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ Ċĉ ĉ super . onCreate ( savedInstanceState ) Ċĉ ĉ binding Ġ= ĠData Binding Util . set ContentView ( this , ĠR . layout . activity _ main ) Ċĉ ĉ set Support ActionBar ( binding . toolbar ) Ċĉ ĉ val Ġadapter Ġ= ĠExamples Adapter () Ċĉ ĉ binding . main Menu . adapter Ġ= Ġadapter Ċĉ ĉ val Ġto Mutable List Ġ= ĠExample . values (). to Mutable List () Ċĉ ĉ to Mutable List . remove At ( 0 ) Ċĉ ĉ adapter . submit List ( to Mutable List ) Ċĉ ĉ binding . main Menu . post Ġ{ Ċĉĉ ĉ adapter . submit List ( Example . values (). to Mutable List ()) Ċĉ ĉ } Ċ ĉ } Ċ } Ċ