package Ġworkflow . tutorial Ċ Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager Ċ import Ġcom . squareup . workflow 1 . ui . Layout Runner Ċ import Ġcom . squareup . workflow 1 . ui . Layout Runner . Companion . bind Ċ import Ġcom . squareup . workflow 1 . ui . View Environment Ċ import Ġcom . squareup . workflow 1 . ui . View Factory Ċ import Ġcom . squareup . workflow 1 . ui . Workflow Ui Experimental Api Ċ import Ġcom . squareup . workflow 1 . ui . back Pressed Handler Ċ import Ġworkflow . tutorial . views . Todo ListAdapter Ċ import Ġworkflow . tutorial . views . databinding . Todo ListView Binding Ċ Ċ @ Opt In ( Workflow Ui Experimental Api :: class ) Ċ class ĠTodo List Layout Runner ( ĊĠ Ġprivate Ġval Ġtodo List Binding : ĠTodo ListView Binding Ċ ) Ġ: ĠLayout Runner < Todo List Screen > Ġ{ ĊĊĠ Ġprivate Ġval Ġadapter Ġ= ĠTodo ListAdapter () ĊĊĠ Ġinit Ġ{ ĊĠĠĠ Ġtodo List Binding . todo List . layout Manager Ġ= ĠLinearLayoutManager ( todo List Binding . root . context ) ĊĠĠĠ Ġtodo List Binding . todo List . adapter Ġ= Ġadapter ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġshow Rendering ( ĊĠĠĠ Ġrendering : ĠTodo List Screen , ĊĠĠĠ Ġview Environment : ĠView Environment ĊĠ Ġ) Ġ{ ĊĠĠĠ Ġtodo List Binding . root . back Pressed Handler Ġ= Ġrendering . on Back ĊĊĠĠĠ Ġwith ( todo List Binding . todo List Welcome ) Ġ{ ĊĠĠĠĠĠ Ġtext Ġ= Ġresources . getString ( R . string . todo _ list _ welcome , Ġrendering . username ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġadapter . todo List Ġ= Ġrendering . todo Titles ĊĠĠĠ Ġadapter . notify DataSet Changed () ĊĠ Ġ} ĊĊĠ Ġcompanion Ġobject Ġ: ĠView Factory < Todo List Screen > Ġby Ġbind ( ĊĠĠĠĠĠ ĠTodo ListView Binding :: inflate , Ġ:: Todo List Layout Runner ĊĠ Ġ) Ċ } Ċ