package Ġio . nova foundation . nova . feature _ c rowd loan _ impl . presentation . contribute . custom . ac ala . main . confirm Ċ Ċ import Ġandroid . os . Parcelable Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . lifecycle . Lifecycle Coroutine Scope Ċ import Ġio . nova foundation . nova . common . utils . add After Ċ import Ġio . nova foundation . nova . common . utils . observe In Lifecycle Ċ import Ġio . nova foundation . nova . common . view . TableCell View Ċ import Ġio . nova foundation . nova . feature _ c rowd loan _ api . data . repository . Par ach ain Metadata Ċ import Ġio . nova foundation . nova . feature _ c rowd loan _ impl . R Ċ import Ġio . nova foundation . nova . feature _ c rowd loan _ impl . presentation . contribute . custom . Confirm Contribut e Custom ization Ċ import Ġio . nova foundation . nova . feature _ c rowd loan _ impl . presentation . contribute . custom . ac ala . main . A cal a Custom ization Payload Ċ import Ġio . nova foundation . nova . feature _ c rowd loan _ impl . presentation . contribute . custom . ac ala . main . base . A cal a Main Flow Custom ization Ċ import Ġio . nova foundation . nova . feature _ c rowd loan _ impl . presentation . contribute . custom . injection LayoutParams Ċ import Ġkotlinx . android . synt hetic . main . fragment _ contribute _ confirm . view . confirm Contribut e Amount Bottom Margin Ċ import Ġkotlinx . android . synt hetic . main . fragment _ contribute _ confirm . view . confirm Contribut e Injection Parent Ċ import Ġkotlinx . coroutines . Coroutine Scope Ċ Ċ class ĠA cal a Confirm Contribut e Custom ization ( ĊĠĠĠ Ġprivate Ġval Ġview State Factory : ĠA cal a Confirm Contribut e ViewState Factory , Ċ ) Ġ: ĠA cal a Main Flow Custom ization < Confirm Contribut e Custom ization . ViewState >(), ĊĠĠĠ ĠConfirm Contribut e Custom ization Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġinject Views ( ĊĠĠĠĠĠĠĠ Ġinto : ĠViewGroup , ĊĠĠĠĠĠĠĠ Ġstate : ĠConfirm Contribut e Custom ization . ViewState , ĊĠĠĠĠĠĠĠ Ġscope : ĠLifecycle Coroutine Scope , ĊĠĠĠ Ġ) Ġ{ ĊĠĠĠĠĠĠĠ Ġrequire ( state Ġis ĠA cal a Confirm Contribut e ViewState ) ĊĊĠĠĠĠĠĠĠ Ġval Ġcontainer Ġ= Ġinto . confirm Contribut e Injection Parent ĊĊĠĠĠĠĠĠĠ Ġval Ġcontribution Cell Ġ= ĠTable Cell View ( into . context ). apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlayout Params Ġ= Ġinjection LayoutParams ( context , Ġtop Margin Dp Ġ= Ġ 0 ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠsetTitle ( R . string . c rowd loan _ contribution ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġstate . contribution Type Flow . observe In Lifecycle ( scope ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcontribution Cell . show Value ( it ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġcontainer . add After ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġanchor Ġ= Ġcontainer . confirm Contribut e Amount Bottom Margin , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġnew Views Ġ= ĠlistOf ( contribution Cell ) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġcreate ViewState ( ĊĠĠĠĠĠĠĠ Ġcoroutine Scope : ĠCor outine Scope , ĊĠĠĠĠĠĠĠ Ġpar ach ain Metadata : ĠPar ach ain Metadata , ĊĠĠĠĠĠĠĠ Ġcustom Payload : ĠParcel able ?, ĊĠĠĠ Ġ): ĠConfirm Contribut e Custom ization . ViewState Ġ{ ĊĠĠĠĠĠĠĠ Ġrequire ( custom Payload Ġis ĠA cal a Custom ization Payload ) ĊĊĠĠĠĠĠĠĠ Ġreturn Ġview State Factory . create ( coroutine Scope , Ġcustom Payload ) ĊĠĠĠ Ġ} Ċ } Ċ