package Ġcom . kotlin note . rem iro bert . kotlin note . Projects List Ċ Ċ import Ġandroid . support . v 7 . app . AppCompatActivity Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . support . v 7 . widget . Linear LayoutManager Ċ import Ġandroid . support . v 7 . widget . RecyclerView Ċ import Ġcom . kotlin note . rem iro bert . kotlin note . Domain . Project Ċ import Ġcom . kotlin note . rem iro bert . kotlin note . R Ċ import Ġcom . kotlin note . rem iro bert . kotlin note . Tasks . Detail Tasks Activity ĊĊ Ċ class ĠMainActivity Ġ: ĠAppCompatActivity () Ġ{ ĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġprivate Ġval ĠTAG Ġ= Ġ" MainActivity " ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġval Ġre cyclerView : ĠRecyclerView Ġby Ġlazy Ġ{ ĊĠĠĠĠĠĠĠ Ġcreate Re cycle View () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . activity _ main ) ĊĠĠĠĠĠĠĠ Ġsetup Re cycle View () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġsetup Re cycle View () Ġ{ ĊĠĠĠĠĠĠĠ Ġre cyclerView . layout Manager Ġ= ĠLinearLayoutManager ( this ) ĊĠĠĠĠĠĠĠ Ġre cyclerView . adapter Ġ= ĠProjects Adapter ( prepare List Tasks (), Ġ{ project Ġ-> ĠĠĊĠĠĠĠĠĠĠĠĠĠĠ Ġshow Project Tasks Activity ( project ) ĊĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġprepare List Tasks (): ĠArrayList < Project > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġlist Ġ= ĠArrayList < Project >() ĊĠĠĠĠĠĠĠ Ġlist . add ( Project (" task 1 ")) ĊĠĠĠĠĠĠĠ Ġlist . add ( Project (" task 2 ")) ĊĠĠĠĠĠĠĠ Ġlist . add ( Project (" task 3 ")) ĊĠĠĠĠĠĠĠ Ġreturn Ġlist ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġcreate Re cycle View (): ĠRecyclerView Ġ= ĠfindViewById ( R . id . recycle _ view _ tasks ) ĊĊĠĠĠ Ġprivate Ġfun Ġshow Project Tasks Activity ( project : ĠProject ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġintent Ġ= ĠDetail Tasks Activity . new Intent ( this ) ĊĠĠĠĠĠĠĠ ĠstartActivity ( intent ) ĊĠĠĠ Ġ} Ċ } Ċ