package Ġcom . example . wallet . ui . home . view Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroid . view . animation . Accel erate De cel erate Interpolator Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroidx . lifecycle . Lifecycle Owner Ċ import Ġandroidx . lifecycle . Observer Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġcom . example . wallet . R Ċ import Ġcom . example . wallet . ui . home . Favorite Transfer Ċ import Ġcom . example . wallet . ui . home . Home Contract Ċ import Ġcom . example . wallet . ui . home . User Singleton Ċ import Ġcom . example . wallet . ui . home . User Singleton Object Ċ import Ġcom . example . wallet . ui . home . data . Message Factory Ċ import Ġcom . example . wallet . ui . home . data . Message Factory . Companion . TYPE _ ERROR Ċ import Ġcom . example . wallet . ui . home . presenter . Home Presenter Ċ import Ġcom . example . wallet . ui . observable . Available Balance Observable Ċ import Ġcom . squareup . pic asso . Pic asso Ċ import Ġkotlinx . android . synt hetic . main . fragment _ home .* Ċ Ċ class ĠHome Fragment Ġ: ĠFragment (), ĠHome Contract . View Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġfavorite Transfer Adapter Ġ= ĊĠĠĠĠĠĠĠ ĠF avorite Transfer Adapter () ĊĊĠĠĠ Ġprivate Ġval Ġavailable Balance Observable Ġ= ĠAvailable Balance Observable () ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġhome Presenter : ĠHome Contract . Presenter ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( ĊĠĠĠĠĠĠĠ Ġinflater : ĠLayoutInflater , ĊĠĠĠĠĠĠĠ Ġcontainer : ĠViewGroup ?, ĊĠĠĠĠĠĠĠ ĠsavedInstanceState : ĠBundle ? ĊĠĠĠ Ġ): ĠView ? Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġinflater . inflate ( R . layout . fragment _ home , Ġcontainer , Ġfalse ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) ĊĠĠĠĠĠĠĠ Ġinit RecyclerView () ĊĠĠĠĠĠĠĠ Ġhome Presenter Ġ= ĠHome Presenter ( this ) ĊĠĠĠĠĠĠĠ Ġhome Presenter ?. retrieve Favorite Trans fers () ĊĠĠĠĠĠĠĠ Ġ/* circular Progress . set Progress With Animation ( ĊĠĠĠĠĠĠĠĠĠĠĠĠ 7 0 f , ĊĠĠĠĠĠĠĠĠĠĠĠĠ 1 0 0 0 , ĊĠĠĠĠĠĠĠĠĠĠĠ ĠAccel erate De cel erate Interpolator (), ĊĠĠĠĠĠĠĠĠĠĠĠĠ 5 0 0 ĊĠĠĠĠĠĠĠ Ġ) */ ĊĠĠĠĠĠĠĠ ĠPic asso ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. get () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. load (" https :// media . lic dn . com / d ms / image / C 4 E 0 3 AQ Fc Cu DI Jl 0 m Kg / profile - display photo - shrink _ 2 0 0 _ 2 0 0 / 0 ? e = 1 5 8 3 3 6 6 4 0 0 & v = beta & t = y mt 3 xg Me 5 b KS - 2 kn N DL 9 m QY F ks P 9 ZH ne 5 ug Iq Ey Rj Zs ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. into ( profile Photo ImageView ) ĊĠĠĠĠĠĠĠ Ġ/* available Balance Observable . add Observer ( object Ġ: ĠObserver Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun Ġnotify Change ( newValue : ĠDouble ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġamount Value TextView . text Ġ= Ġ"$ Ġ$ newValue " ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ}) */ ĊĊĠĠĠĠĠĠĠ Ġhome Presenter !!. get Percentage LiveData (). observe ( this , ĠObserver < String >{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ// value Ġ-> Ġpercentage Text . text Ġ= Ġvalue ĊĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġinit RecyclerView () Ġ{ ĊĠĠĠĠĠĠĠ Ġfavorite Trans fers RecyclerView . layout Manager Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠLinearLayoutManager ( context , ĠRecyclerView . HORIZONTAL , Ġfalse ) ĊĠĠĠĠĠĠĠ Ġfavorite Trans fers RecyclerView . adapter Ġ= Ġfavorite Transfer Adapter ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġshow Loader () Ġ{ ĊĠĠĠĠĠĠĠ Ġhome Loader . visibility Ġ= ĠView . VISIBLE ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġhide Loader () Ġ{ ĊĠĠĠĠĠĠĠ Ġhome Loader . visibility Ġ= ĠView . GONE ĊĠĠĠĠĠĠĠ Ġprintln ( User Singleton . getInstance (). userName ) ĊĠĠĠĠĠĠĠ Ġprintln ( User Singleton Object . userName ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġshow Favorite Trans fers ( favorite Transfer : ĠList < Favorite Transfer >) Ġ{ ĊĠĠĠĠĠĠĠ Ġfavorite Transfer Adapter . setData ( favorite Transfer ) ĊĠĠĠĠĠĠĠ Ġ// FACTORY ĊĠĠĠĠĠĠĠ Ġval Ġdialog Factory Ġ= ĠMessage Factory () ĊĠĠĠĠĠĠĠ Ġcontext ?. let Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdialog Factory . get Dialog ( it , Ġ" type Info "). show () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }