package Ġcom . sc wang . refresh layout . ui Ċ Ċ import Ġandroid . content . Intent Ċ import Ġandroid . os . Bundle Ċ import Ġcom . sc wang . refresh layout . adapter . Sample Recycler Adapter Ċ import Ġcom . sc wang . refresh layout . data . Sample Ċ import Ġcom . sc wang . refresh layout . databinding . Activity Main Binding Ċ import Ġcom . sc wang . refresh layout . util . Recycler Helper Ċ Ċ class ĠMainActivity Ġ: ĠBase View Binding Activity < Activity Main Binding >() Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġsamples Ġ= ĠlistOf < Sample >( ĊĠĠĠĠĠĠĠ ĠSample (" Bezier Circle ", ĠBe zier Circle Activity :: class . java ), ĊĠĠĠĠĠĠĠ ĠSample (" Material ", ĠMaterial Activity :: class . java ), ĊĠĠĠĠĠĠĠ ĠSample (" Classic ", ĠClass ic Activity :: class . java ), ĊĠĠĠĠĠĠĠ ĠSample (" load More ", ĠLoad More Activity :: class . java ), ĊĠĠĠĠĠĠĠ ĠSample (" Layout ", ĠLayout Activity :: class . java ), ĊĠĠĠĠĠĠĠ ĠSample (" Custom ", ĠCustom Refresh Activity :: class . java ), ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġoverride Ġfun Ġget View Binding (): ĠActivity Main Binding Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠActivity Main Binding . inflate ( layout Inflater ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ Ġinit Data () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġinit Data () Ġ{ ĊĠĠĠĠĠĠĠ Ġbinding . sample . adapter Ġ= ĠSample Recycler Adapter ( samples ){ _, Ġposition -> ĊĠĠĠĠĠĠĠĠĠĠĠ ĠstartActivity ( Intent ( this @ MainActivity , Ġsamples [ position ]. clazz )) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ ĠRe cycler Helper . setLayout ( binding . sample ) ĊĠĠĠ Ġ} Ċ }