package Ġcom . my ether wallet . me w connect . feature . buy . adapter . holder Ċ Ċ import Ġandroid . support . v 7 . widget . RecyclerView Ċ import Ġandroid . view . View Ċ import Ġcom . my ether wallet . me w connect . R Ċ import Ġcom . my ether wallet . me w connect . core . ext enst ion . format Us d Ċ import Ġcom . my ether wallet . me w connect . feature . buy . data . Purchase Status Ċ import Ġkotlinx . android . synt hetic . main . list _ item _ history . view .* Ċ import Ġjava . util .* Ċ Ċ class ĠHistory Holder ( item View : ĠView ) Ġ: ĠRecyclerView . ViewHolder ( item View ) Ġ{ ĊĊĠĠĠ Ġfun Ġbind ( status : ĠPurchase Status ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcontext Ġ= ĠitemView . context ĊĠĠĠĠĠĠĠ Ġval Ġdate Ġ= ĠDate () ĊĠĠĠĠĠĠĠ ĠitemView . history _ date . text Ġ= ĠString . format ( Locale . US , Ġcontext . getString ( R . string . history _ date ), Ġdate , Ġdate ) ĊĠĠĠĠĠĠĠ ĠitemView . history _ total _ amount . text Ġ= Ġstatus . fi at Total Amount . amount . format Us d () ĊĠĠĠĠĠĠĠ ĠitemView . history _ status . text Ġ= Ġstatus . status . toLowerCase (). capitalize () ĊĠĠĠĠĠĠĠ Ġval Ġstatus LowerCase Ġ= Ġstatus . status . toLowerCase () ĊĠĠĠĠĠĠĠ Ġif Ġ( status LowerCase Ġ== ĠPurchase Status . STATUS _ IN _ PROGRESS ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠitemView . history _ status . setTextColor ( context . getColor ( R . color . blue )) ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġif Ġ( status LowerCase Ġ== ĠPurchase Status . STATUS _ DECL IN ED ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠitemView . history _ status . setTextColor ( context . getColor ( R . color . red )) ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠitemView . history _ status . setTextColor ( context . getColor ( R . color . text _ black )) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ