package Ġcom . el pass ion . android . commons . recycler _ example . group Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . Intent Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . util . Log Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager Ċ import Ġcom . el pass ion . android . commons . recycler . adapters . basic Adapter With Layout And Binder Ċ import Ġcom . el pass ion . android . commons . recycler . basic . as Basic List With Sections Ċ import Ġcom . el pass ion . android . commons . recycler _ example . R Ċ import Ġcom . el pass ion . android . commons . recycler _ example . common . User Ċ import Ġcom . el pass ion . android . commons . recycler _ example . common . create Many Users Ċ import Ġkotlinx . android . synt hetic . main . github _ item . view .* Ċ import Ġkotlinx . android . synt hetic . main . recycler _ view .* Ċ Ċ class ĠBasic Recycler With Section Activity Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . recycler _ view ) ĊĠĠĠĠĠĠĠ Ġre cyclerView . layout Manager Ġ= ĠLinearLayoutManager ( this ) ĊĠĠĠĠĠĠĠ Ġval Ġusers Ġ= Ġcreate Many Users (). groupBy ( User :: organization ). as Basic List With Sections () ĊĠĠĠĠĠĠĠ Ġre cyclerView . adapter Ġ= Ġbasic Adapter With Layout And Binder ( users , ĠR . layout . github _ item ) Ġ{ Ġholder , Ġuser Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġwith ( holder . item View ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠuserName . text Ġ= Ġuser . name ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġorganization . text Ġ= Ġuser . organization ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ ĠLog . i ( Basic Recycler With Section Activity :: class . java . name , Ġ" Section ĠA Ġsize : Ġ${ users . sections [" A "] !!. size }") ĊĠĠĠĠĠĠĠ ĠLog . i ( Basic Recycler With Section Activity :: class . java . name , Ġ" Section ĠB Ġsize : Ġ${ users . sections [" B "] !!. size }") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĊĠĠĠĠĠĠĠ Ġfun Ġstart ( context : ĠContext ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcontext . startActivity ( Intent ( context , ĠBasic Recycler With Section Activity :: class . java )) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġconst Ġval ĠDESCRIPTION Ġ= Ġ" Basic Ġre cycler Ġwith Ġsections " ĊĠĠĠ Ġ} Ċ }