package Ġcom . sp ir acle software . android sample . feature . transaction _ detail . cards . item Ċ Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . ViewGroup Ċ import Ġcom . sp ir acle software . android sample . R Ċ import Ġcom . sp ir acle software . android sample . databinding . Note Card Item Binding Ċ import Ġcom . sp ir acle software . android sample . feature . transaction _ detail . cards . item . model . Note Card Model Ċ import Ġcom . sp ir acle software . android sample . framework . extensions . onClick Ċ import Ġcom . sp ir acle software . android sample . framework . extensions . string Ċ Ċ class ĠNote Card Item ( ĊĠĠĠ Ġmodel : ĠNote Card Model , ĊĠĠĠ Ġprivate Ġval ĠonChange Note : Ġ() Ġ-> ĠUnit Ċ ) Ġ: ĠModel Binding Card Item < Note Card Model , ĠNote Card Item Binding >( model ) Ġ{ ĊĊĠĠĠ Ġoverride Ġvar Ġidentifier : ĠLong Ġ= ĠR . id . note _ card _ item . to Long () ĊĊĠĠĠ Ġoverride Ġval Ġtype Ġ= ĠR . id . note _ card _ item ĊĊĠĠĠ Ġoverride Ġfun Ġcreate Binding ( in flater : ĠLayoutInflater , Ġparent : ĠViewGroup ?) Ġ= ĊĠĠĠĠĠĠĠ ĠNote Card Item Binding . inflate ( in flater , Ġparent , Ġfalse ) ĊĊĠĠĠ Ġoverride Ġfun Ġbind View ( binding : ĠNote Card Item Binding , Ġpayload s : ĠList < Any >) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġctx Ġ= Ġbinding . root . context ĊĊĠĠĠĠĠĠĠ Ġbinding . note Text Ġ= Ġmodel . note ĊĠĠĠĠĠĠĠ Ġbinding . action Text Ġ= Ġif Ġ( model . note Ġ== Ġnull ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġctx . string ( R . string . transaction _ detail __ add _ note ) ĊĠĠĠĠĠĠĠ Ġelse ĊĠĠĠĠĠĠĠĠĠĠĠ Ġctx . string ( R . string . transaction _ detail __ edit _ note ) ĊĊĠĠĠĠĠĠĠ Ġbinding . action View . onClick (:: onChange Note . get ()) ĊĠĠĠ Ġ} Ċ Ċ }