package Ġcom . applic aster . opt a . stat ss creen plugin . react native Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . widget .* Ċ import Ġandroidx . constraint layout . widget . Constraint Layout Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġcom . applic aster . opt a . stat ss creen plugin . R Ċ import Ġcom . applic aster . opt a . stat ss creen plugin . data . model . Match Model Ċ import Ġcom . applic aster . opt a . stat ss creen plugin . data . model . Player S quad Model Ċ import Ġcom . applic aster . opt a . stat ss creen plugin . data . model . Team Model Ċ import Ġcom . applic aster . opt a . stat ss creen plugin . plugin . Plugin Data Repository Ċ import Ġcom . applic aster . opt a . stat ss creen plugin . screens . all matches . All Matches Interactor Ċ import Ġcom . applic aster . opt a . stat ss creen plugin . screens . all matches . All Matches Presenter Ċ import Ġcom . applic aster . opt a . stat ss creen plugin . screens . all matches . All Matches View Ċ import Ġcom . applic aster . opt a . stat ss creen plugin . screens . home . adapters . Group Adapter Ċ import Ġcom . applic aster . opt a . stat ss creen plugin . screens . home . adapters . Match Adapter Ċ import Ġcom . applic aster . opt a . stat ss creen plugin . screens . team . Team Interactor Ċ import Ġcom . applic aster . opt a . stat ss creen plugin . screens . team . Team Presenter Ċ import Ġcom . applic aster . opt a . stat ss creen plugin . screens . team . Team View Ċ import Ġcom . applic aster . opt a . stat ss creen plugin . screens . team . adapter . S quad Adapter Ċ import Ġcom . applic aster . opt a . stat ss creen plugin . utils . Model Utils Ċ import Ġcom . applic aster . opt a . stat ss creen plugin . utils . Plugin Utils Ċ import Ġcom . applic aster . opt a . stat ss creen plugin . utils . Url Type Ċ import Ġcom . applic aster . util . AP Logger Ċ import Ġcom . applic aster . util . StringUtil Ċ import Ġcom . ch ah in em . page indicator . Page Indicator Ċ import Ġcom . squareup . pic asso . Pic asso Ċ Ċ class ĠOpt a Team View ( context : ĠContext ) ĊĠĠĠ Ġ: ĠFrame Layout ( context ), ĠTeam View , ĠAll Matches View , ĊĠĠĠĠĠĠĠ ĠS quad Adapter . On Player Clicked Listener , ĊĠĠĠĠĠĠĠ ĠGroup Adapter . On Team Flag ClickListener , ĠMatch Adapter . On Match ClickListener Ġ{ ĊĊĠĠĠ Ġprivate Ġvar Ġll _ team : ĠLinearLayout ĊĊĠĠĠ Ġprivate Ġvar Ġtv _ gf _ value : ĠTextView ĊĠĠĠ Ġprivate Ġvar Ġtv _ gc _ value : ĠTextView ĊĠĠĠ Ġprivate Ġvar Ġtv _ pos se sion _ value : ĠTextView ĊĠĠĠ Ġprivate Ġvar Ġtv _ pass _ accuracy _ value : ĠTextView ĊĊĠĠĠ Ġprivate Ġvar Ġrv _ matches _ team : ĠRecyclerView ĊĊĠĠĠ Ġprivate Ġvar Ġpi _ matches : ĠPage Indicator ĊĊĠĠĠ Ġprivate Ġvar Ġcl _ container : ĠConstraint Layout ĊĠĠĠ Ġprivate Ġvar Ġrv _ s quad : ĠRecyclerView ĊĊĠĠĠ Ġprivate Ġvar Ġrl _ info _ not _ available : ĠRelative Layout ĊĊĠĠĠ Ġprivate Ġvar Ġiv _ team _ flag : ĠImageView ĊĠĠĠ Ġprivate Ġvar Ġiv _ team _ sh irt : ĠImageView ĊĠĠĠ Ġprivate Ġvar Ġiv _ team _ shield : ĠImageView ĊĊĠĠĠ Ġprivate Ġvar Ġtv _ team _ name : ĠTextView ĊĊĠĠĠ Ġprivate Ġvar Ġtv _ americ as _ c ups _ quantity : ĠTextView ĊĊĠĠĠ Ġprivate Ġvar Ġiv _ cup : ĠImageView ĊĊĠĠĠ Ġprivate Ġvar Ġteam Presenter : ĠTeam Presenter Ġ= ĠTeam Presenter ( this , ĠTeam Interactor ()) ĊĠĠĠ Ġprivate Ġvar Ġall Matches Presenter : ĠAll Matches Presenter Ġ= ĠAll Matches Presenter ( this , ĠAll Matches Interactor ()) ĊĊĠĠĠ Ġprivate Ġvar Ġteam Id : ĠString ? Ġ= Ġnull ĊĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ ĠAP Logger . info ( TAG , Ġ" Opt a Team View Ġcreated ") ĊĠĠĠĠĠĠĠ Ġval Ġview Ġ= ĠLayoutInflater . from ( context ). inflate ( R . layout . fragment _ s quad , Ġthis , Ġfalse ) ĊĊĠĠĠĠĠĠĠ Ġll _ team Ġ= Ġview . findViewById ( R . id . ll _ team ) ĊĊĠĠĠĠĠĠĠ Ġtv _ gf _ value Ġ= Ġview . findViewById ( R . id . tv _ gf _ value ) ĊĠĠĠĠĠĠĠ Ġtv _ gc _ value Ġ= Ġview . findViewById ( R . id . tv _ gc _ value ) ĊĠĠĠĠĠĠĠ Ġtv _ pos se sion _ value Ġ= Ġview . findViewById ( R . id . tv _ pos se sion _ value ) ĊĠĠĠĠĠĠĠ Ġtv _ pass _ accuracy _ value Ġ= Ġview . findViewById ( R . id . tv _ pass _ accuracy _ value ) ĊĊĠĠĠĠĠĠĠ Ġrv _ matches _ team Ġ= Ġview . findViewById ( R . id . rv _ matches _ team ) ĊĊĠĠĠĠĠĠĠ Ġpi _ matches Ġ= Ġview . findViewById ( R . id . pi _ matches ) ĊĊĠĠĠĠĠĠĠ Ġcl _ container Ġ= Ġview . findViewById ( R . id . cl _ container ) ĊĠĠĠĠĠĠĠ Ġrv _ s quad Ġ= Ġview . findViewById ( R . id . rv _ s quad ) ĊĊĠĠĠĠĠĠĠ Ġrl _ info _ not _ available Ġ= Ġview . findViewById ( R . id . rl _ info _ not _ available ) ĊĊĠĠĠĠĠĠĠ Ġiv _ team _ flag Ġ= Ġview . findViewById ( R . id . iv _ team _ flag ) ĊĠĠĠĠĠĠĠ Ġiv _ team _ sh irt Ġ= Ġview . findViewById ( R . id . iv _ team _ sh irt ) ĊĠĠĠĠĠĠĠ Ġiv _ team _ shield Ġ= Ġview . findViewById ( R . id . iv _ team _ shield ) ĊĊĠĠĠĠĠĠĠ Ġtv _ team _ name Ġ= Ġview . findViewById ( R . id . tv _ team _ name ) ĊĊĠĠĠĠĠĠĠ Ġtv _ americ as _ c ups _ quantity Ġ= Ġview . findViewById ( R . id . tv _ americ as _ c ups _ quantity ) ĊĊĠĠĠĠĠĠĠ Ġiv _ cup Ġ= Ġview . findViewById ( R . id . iv _ cup ) ĊĊĠĠĠĠĠĠĠ Ġif Ġ(! Plugin Data Repository . INSTANCE . is Show Team ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġll _ team . visibility Ġ= ĠView . GONE ĊĊĠĠĠĠĠĠĠ Ġview . layout Params Ġ= ĠLayout Params ( LayoutParams . MATCH _ PARENT , ĠLayout Params . MATCH _ PARENT ) ĊĠĠĠĠĠĠĠ Ġadd View ( view ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġrequest Layout () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . request Layout () ĊĊĠĠĠĠĠĠĠ Ġ// ĠThis Ġview Ġrelies Ġon Ġa Ġmeasure Ġ+ Ġlayout Ġpass Ġhappening Ġafter Ġit Ġcalls Ġrequest Layout (). ĊĠĠĠĠĠĠĠ Ġ// Ġhttps :// github . com / facebook / react - native / issues / 4 9 9 0 # issuecomment - 1 8 0 4 1 5 5 1 0 ĊĠĠĠĠĠĠĠ Ġ// Ġhttps :// stackoverflow . com / questions / 3 9 8 3 6 3 5 6 / react - native - resize - custom - ui - component ĊĠĠĠĠĠĠĠ Ġpost ( measure And Layout ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġval Ġmeasure And Layout Ġ= ĠRunnable Ġ{ ĊĠĠĠĠĠĠĠ Ġmeasure ( Measure Spec . make Measure Spec ( width , ĠMeasure Spec . EX ACT LY ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠMeasure Spec . make Measure Spec ( height , ĠMeasure Spec . EX ACT LY )) ĊĠĠĠĠĠĠĠ Ġlayout ( left , Ġtop , Ġright , Ġbottom ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġset Team ( team Id : ĠString ){ ĊĠĠĠĠĠĠĠ Ġthis . team Id Ġ= Ġteam Id ; ĊĠĠĠĠĠĠĠ Ġteam Presenter . get Team S quad ( team Id ) ĊĠĠĠĠĠĠĠ Ġteam Presenter . get Team Stats ( team Id ) ĊĠĠĠĠĠĠĠ Ġteam Presenter . get Tro ph ies ( team Id ) ĊĠĠĠĠĠĠĠ Ġall Matches Presenter . getAll Matches ById ( team Id ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġget Team Stats Success ( team : ĠTeam Model . Team ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġgoals Ġ= ĠModel Utils . get Team Statistic ( team . contest ant . stat , Ġ" Go als ") ĊĠĠĠĠĠĠĠ Ġval Ġgoals Con ce ded Ġ= ĠModel Utils . get Team Statistic ( team . contest ant . stat , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" Go als ĠCon ce ded ") ĊĠĠĠĠĠĠĠ Ġval Ġpos session Percentage Ġ= ĠModel Utils . get Team Statistic ( team . contest ant . stat , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" Pos session ĠPer centage ") ĊĠĠĠĠĠĠĠ Ġval Ġpassing Accuracy Ġ= ĠModel Utils . get Team Statistic ( team . contest ant . stat , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" Pass ing ĠAccuracy ") ĊĊĠĠĠĠĠĠĠ Ġtv _ gf _ value . text Ġ= Ġif Ġ(! StringUtil . isEmpty ( goals )) Ġgoals Ġelse Ġ"-" ĊĠĠĠĠĠĠĠ Ġtv _ gc _ value . text Ġ= Ġif Ġ(! StringUtil . isEmpty ( goals Con ce ded )) Ġgoals Con ce ded Ġelse Ġ"-" ĊĠĠĠĠĠĠĠ Ġtv _ pos se sion _ value . text Ġ= Ġif Ġ(! StringUtil . isEmpty ( pos session Percentage )) ĠString . format ("% ,. 2 f %% ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġpos session Percentage ?. toFloat ()) Ġelse Ġ"-" ĊĠĠĠĠĠĠĠ Ġtv _ pass _ accuracy _ value . text Ġ= Ġif Ġ(! StringUtil . isEmpty ( pass ing Accuracy )) ĠString . format ("% ,. 2 f %% ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġpassing Accuracy ?. toFloat ()) Ġelse Ġ"-" ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetAll Matches Success ( all Matches : ĠList < Match Model . Match >) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġall Matches Adapter Ġ= ĠMatch Adapter ( all Matches , Ġcontext , Ġthis , Ġthis , Ġtrue ) ĊĠĠĠĠĠĠĠ Ġrv _ matches _ team . layout Manager Ġ= ĠLinearLayoutManager ( context , ĠLinearLayoutManager . HORIZONTAL , Ġfalse ) ĊĠĠĠĠĠĠĠ Ġrv _ matches _ team . adapter Ġ= Ġall Matches Adapter ĊĠĠĠĠĠĠĠ Ġall Matches Adapter . notify DataSet Changed () ĊĠĠĠĠĠĠĠ Ġpi _ matches . attach To ( rv _ matches _ team ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetAll Matches Fail ( error : ĠString ?) Ġ{ ĊĠĠĠĠĠĠĠ ĠToast . makeText ( context , Ġerror , ĠToast . LENGTH _ SHORT ). show () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġget Team Stats Failed ( error : ĠString ?) Ġ{ ĊĠĠĠĠĠĠĠ ĠToast . makeText ( context , Ġerror , ĠToast . LENGTH _ SHORT ). show () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Team Flag Clicked ( team Id : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġif ( this . team Id Ġ!= Ġteam Id ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠPlugin Utils . goTo Team Screen ( team Id ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Match Clicked ( match Id : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ ĠPlugin Utils . goTo Match Details Screen ( match Id ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġtoggle Visibility ( view Data : ĠBoolean ) Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( view Data ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcl _ container . visibility Ġ= ĠView . VISIBLE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrv _ s quad . visibility Ġ= ĠView . VISIBLE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrv _ matches _ team . visibility Ġ= ĠView . VISIBLE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpi _ matches . visibility Ġ= ĠView . VISIBLE Ċ // ĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( Plugin Data Repository . INSTANCE . is Show Team ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġll _ team . visibility Ġ= ĠView . VISIBLE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrl _ info _ not _ available . visibility Ġ= ĠView . GONE ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcl _ container . visibility Ġ= ĠView . GONE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrv _ s quad . visibility Ġ= ĠView . GONE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrv _ matches _ team . visibility Ġ= ĠView . GONE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpi _ matches . visibility Ġ= ĠView . GONE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġll _ team . visibility Ġ= ĠView . GONE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrl _ info _ not _ available . visibility Ġ= ĠView . VISIBLE ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġshow Progress () Ġ{// Ġtodo : Ġimplement Ġthis Ġmethod ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġhide Progress () Ġ{// Ġtodo : Ġimplement Ġthis Ġmethod ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Detached From Window () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Detached From Window () ĊĠĠĠĠĠĠĠ Ġteam Presenter . on Destroy () ĊĠĠĠĠĠĠĠ Ġall Matches Presenter . on Destroy () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Player Clicked ( player Id : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ ĠPlugin Utils . goTo Player Screen ( player Id ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġget Team S quad Success ( team S quad : ĠPlayer S quad Model . Player S quad ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġs quad Ġ= Ġteam S quad . s quad [ 0 ] ĊĊĠĠĠĠĠĠĠ Ġs quad . contest ant Id . let Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠPic asso . get (). load ( Model Utils . getImage Url ( Url Type . Flag , Ġit )). placeholder ( R . drawable . unk now _ flag ). into ( iv _ team _ flag ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠPic asso . get (). load ( Model Utils . getImage Url ( Url Type . Sh irt , Ġit )). into ( iv _ team _ sh irt ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠPic asso . get (). load ( Model Utils . getImage Url ( Url Type . Shield , Ġit )). into ( iv _ team _ shield ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġtv _ team _ name . text Ġ= Ġs quad . contest ant Name ĊĊĠĠĠĠĠĠĠ Ġif Ġ( s quad . person . isNotEmpty ()) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrv _ s quad . layout Manager Ġ= ĠLinearLayoutManager ( context ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrv _ s quad . is Nested Scrolling Enabled Ġ= Ġfalse ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġrv _ s quad . adapter Ġ= ĠS quad Adapter ( sort Team ( team S quad . s quad [ 0 ]. person ), Ġcontext , Ġthis ) ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġll _ team . visibility Ġ= ĠView . GONE ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġtoggle Visibility ( true ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġsort Team ( team : ĠList < Player S quad Model . Person >): ĠList < Player S quad Model . Person > Ġ{ ĊĊĠĠĠĠĠĠĠ Ġval Ġsorted Team : ĠMutable List < Player S quad Model . Person > Ġ= ĠArrayList () ĊĊĠĠĠĠĠĠĠ Ġval Ġgoal K ee pers Ġ: ĠList < Player S quad Model . Person > Ġ= Ġteam . filter Ġ{ Ġs Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġs . type . equals (" PLAYER ", Ġtrue ) Ġ&& Ġs . position . equals (" GO AL KE E PER ", Ġtrue ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġsorted Team . addAll ( goal K ee pers ) ĊĠĠĠĠĠĠĠ Ġval Ġdef enders Ġ: ĠList < Player S quad Model . Person > Ġ= Ġteam . filter Ġ{ Ġs Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġs . type . equals (" PLAYER ", Ġtrue ) Ġ&& Ġs . position . equals (" DEF ENDER ", Ġtrue ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġsorted Team . addAll ( def enders ) ĊĠĠĠĠĠĠĠ Ġval Ġmid field ers Ġ: ĠList < Player S quad Model . Person > Ġ= Ġteam . filter Ġ{ Ġs Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġs . type . equals (" PLAYER ", Ġtrue ) Ġ&& Ġs . position . equals (" MID FI EL DER ", Ġtrue ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġsorted Team . addAll ( mid field ers ) ĊĠĠĠĠĠĠĠ Ġval Ġstri kers Ġ: ĠList < Player S quad Model . Person > Ġ= Ġteam . filter Ġ{ Ġs Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġs . type . equals (" PLAYER ", Ġtrue ) Ġ&& Ġs . position . equals (" ATT ACK ER ", Ġtrue ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġsorted Team . addAll ( stri kers ) ĊĠĠĠĠĠĠĠ Ġval Ġunknown s Ġ: ĠList < Player S quad Model . Person > Ġ= Ġteam . filter Ġ{ Ġs Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġs . type . equals (" PLAYER ", Ġtrue ) Ġ&& Ġs . position . equals (" UNKNOWN ", Ġtrue ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġsorted Team . addAll ( unknown s ) ĊĠĠĠĠĠĠĠ Ġval Ġco aches Ġ: ĠList < Player S quad Model . Person > Ġ= Ġteam . filter Ġ{ Ġs Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġs . type . equals (" CO ACH ", Ġtrue ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġsorted Team . addAll ( co aches ) ĊĠĠĠĠĠĠĠ Ġval Ġassistant Co aches Ġ: ĠList < Player S quad Model . Person > Ġ= Ġteam . filter Ġ{ Ġs Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġs . type . equals (" AS SIST ANT ĠCO ACH ", Ġtrue ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġsorted Team . addAll ( assistant Co aches ) ĊĊĠĠĠĠĠĠĠ Ġreturn Ġsorted Team ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġget Team S quad Fail ( error : ĠString ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġtoggle Visibility ( false ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġget Tro ph ies Success ( counter : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( counter Ġ!= Ġ 0 ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtv _ americ as _ c ups _ quantity . text Ġ= ĠString . format (" X % d ", Ġcounter ) ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġiv _ cup . visibility Ġ= ĠView . IN VISIBLE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtv _ americ as _ c ups _ quantity . visibility Ġ= ĠView . IN VISIBLE ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġget Tro ph ies Failed ( error : ĠString ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġ// Ġdo Ġnothing ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġconst Ġval ĠTAG Ġ= Ġ" Opt a Team View " ĊĠĠĠ Ġ} Ċ }