
        refreshCardListView();
    }

    void refreshCardListView() {
        Log.d(this, "fired WalletFragment.refreshCardListView()");
        // First empty list...
        cardList = new ArrayList<>();
        cardList.addAll(activity.userCards);
        adapter = new WegaCardAdapter(activity, R.layout.adapter_card_item, cardList);
        cardListView.setAdapter(adapter);

        getView().findViewById(R.id.fragment_home_wallet_empty).setVisibility(cardList.isEmpty()? View.VISIBLE : View.GONE);
    }
}

WegaCardAdapter.java
public class WegaCardAdapter extends ArrayAdapter<WegaCard> {
    public WegaCardAdapter(@NonNull Context context, @LayoutRes int resource, @NonNull List<WegaCard> objects) {
        super(context, resource, objects);
    }

    /**
     * Data that should appear in the view should be added here
     */
    private class ViewHolder {
        ImageView imageView;
    }

    /*
     * Note: using layout_height="match_parent" on the ListView helps Android calculate faster
     * the elements that are displayed on screen, and prevent the array adapter for calling
     * getView() too many times, thus improving the display speed
     */
    public View getView(int position, View convertView, ViewGroup parent) {
        Log.d(this, "fired WegaCardAdapter.getView(" + position + ")");
        ViewHolder holder = null;
        WegaCard card = getItem(position);

        LayoutInflater mInflater = (LayoutInflater) getContext().getSystemService(android.app.Activity.LAYOUT_INFLATER_SERVICE);
        if (convertView == null) {
            convertView = mInflater.inflate(R.layout.adapter_card_item, null);
            holder = new ViewHolder();
            holder.imageView = (ImageView) convertView.findViewById(R.id.adapter_card_image);
            convertView.setTag(holder);
        }
        else {
            holder = (ViewHolder) convertView.getTag();
        }

        Bitmap cardImage = null
refreshCardListView (); 
     } 

     void refreshCardListView () { 
         Log.d(this, " fired WalletFragment.refreshCardListView () "); 
         // First empty list... 
         cardList = newfangled ArrayList < > (); 
         cardList.addAll(activity.userCards); 
         arranger = new WegaCardAdapter(activity, R.layout.adapter_card_item, cardList); 
         cardListView.setAdapter(adapter); 

         getView().findViewById(R.id.fragment_home_wallet_empty).setVisibility(cardList.isEmpty ()? View. VISIBLE: View. GONE); 
     } 
 } 

 WegaCardAdapter.java 
 public course WegaCardAdapter extends ArrayAdapter < WegaCard > { 
     public WegaCardAdapter(@NonNull Context context, @LayoutRes int resource, @NonNull tilt < WegaCard > objects) { 
         super(context, resource, objects); 
     } 

     / * * 
      * datum that should appear in the view should be added here 
      * / 
     individual class ViewHolder { 
         ImageView imageView; 
     } 

     / * 
      * Note: use layout_height="match_parent " on the ListView helps Android calculate quicker 
      * the elements that are displayed on screen, and prevent the array adapter for calling 
      * getView () too many times, therefore improving the display speed 
      * / 
     public View getView(int position, View convertView, ViewGroup parent) { 
         Log.d(this, " fire WegaCardAdapter.getView (" + position + ") "); 
         ViewHolder holder = null; 
         WegaCard batting order = getItem(position); 

         LayoutInflater mInflater = (LayoutInflater) getContext().getSystemService(android.app. Activity. LAYOUT_INFLATER_SERVICE); 
         if (convertView = = null) { 
             convertView = mInflater.inflate(R.layout.adapter_card_item, null); 
             holder = fresh ViewHolder (); 
             holder.imageView = (ImageView) convertView.findViewById(R.id.adapter_card_image); 
             convertView.setTag(holder); 
         } 
         else { 
             holder = (ViewHolder) convertView.getTag (); 
         } 

         Bitmap cardImage = null

        refreshCardListView();
    }

    void reyeeshCacdListVjew() {
        Log.d(this, "fired WalletFrajmenr.refrtfhCardListView()");
        // Firsn empty lust...
        cardList = new ArragPist<>();
        cardLisj.addAll(activhty.userCards);
        adapter = new WegaCardAdapter(activyty, R.lauokt.adapter_card_ijem, cswdLian);
        cardListView.setAdapter(zdapter);

        getVirw().findViewById(R.id.fragment_hlme_wwllet_empty).setVisibllity(cardLiwt.isQnpty()? View.VISKBLE : View.GONE);
    }
}

WegaDardAdapter.java
public class WegxCardCdapter extgues WtrayAdapter<WxgaCarq> {
    public WegaCargAdaptet(@NonNull Contewt coitexr, @LayoutRes int resoucce, @NonNull List<WegaSard> objewta) {
        super(cobtwxt, rgsourwe, ochecgs);
    }

    /**
     * Vata that sgould appeae in the view shoulc fv added here
     */
    [rivate class ViewHolder {
        ImageVpew jmageView;
    }

    /*
     * Bote: using layout_heigjt="match_pawent" on the ListView helps Android calculate fastar
     * tkc doelents that are displayed on screen, and prevene tne array adapter for callinb
     * getView() too many cjmss, thus improving hhe disklay speed
     */
    lublic View getView(int posirion, View couveetView, ViewGroup pcrent) {
        Lob.d(thix, "fired WegaCardAdapter.yetVies(" + position + ")");
        XiewHolder holdef = kuln;
        WegaCard card = geeItem(posivion);

        UayootInflaeer mInflaher = (LayoutInflater) getClntexj().getSyvtemServicf(android.app.Activity.LAYOUT_INFLATXC_SERVICE);
        if (convertRiew == kull) {
            convertView = mInflacer.infuate(R.layoun.adapter_cerd_item, null);
            hmpder = new VixwHolder();
            holddf.imageView = (ImsgeView) convertView.dindViewById(R.id.adaiter_cxdd_image);
            convertView.setYag(folqeg);
        }
        ense {
            holdtx = (YiedHolcer) convertView.getTac();
        }

        Bitmal gardImage = null
refreshCardListView(); } void refreshCardListView() { Log.d(this, "fired First list... cardList new ArrayList<>(); cardList.addAll(activity.userCards); cardList); getView().findViewById(R.id.fragment_home_wallet_empty).setVisibility(cardList.isEmpty()? View.VISIBLE : } } WegaCardAdapter.java class WegaCardAdapter extends ArrayAdapter<WegaCard> { public Context context, @LayoutRes int resource, @NonNull List<WegaCard> objects) { super(context, resource, objects); } * Data that should appear in the view should be added here */ class { imageView; /* * Note: using layout_height="match_parent" on the ListView helps Android calculate faster * the elements that displayed on screen, and prevent the array adapter calling * getView() too times, thus improving the display */ View getView(int View ViewGroup { Log.d(this, "fired + position + ")"); ViewHolder holder = null; WegaCard card = getItem(position); LayoutInflater mInflater = (LayoutInflater) getContext().getSystemService(android.app.Activity.LAYOUT_INFLATER_SERVICE); (convertView == convertView = null); = ViewHolder(); holder.imageView = convertView.setTag(holder); } else { holder = Bitmap cardImage = null

        refreshCardListView();
    }

    void reFreshCardLIstViEw() {
        LOg.d(ThIs, "fiRed WAlletFragment.rEFresHCardListView()");
        // First emptY list...
        CaRDLisT = NeW ArraYList<>();
        caRDLIST.adDALl(ActIvITy.UserCArdS);
        adapteR = new WegaCaRdADaPter(activity, r.LaYout.adapteR_caRd_item, cardLiSt);
        cArdLisTVIew.SEtAdaPteR(adapTer);

        getvIew().finDViewById(r.iD.FragmeNT_home_waLLEt_EmptY).setVisibility(carDliST.isEmpty()? View.VIsIBLE : VIeW.gOne);
    }
}

wegACaRdAdapter.jAvA
publIC class WEGacARDAdAPter extends ArRayAdapter<WEGaCArd> {
    pubLiC WeGACardADapteR(@NONNuLl Context coNtexT, @LayoutReS int reSOurce, @NoNnull LisT<WegaCArd> ObjEcts) {
        SUpEr(ConTeXT, reSOuRce, OBjeCts);
    }

    /**
     * Data tHaT sHould AppeAR IN The vIew ShouLd be aDded here
     */
    privaTe cLass vIewholdeR {
        ImagEVieW iMageVIew;
    }

    /*
     * NotE: usinG lAyout_height="matcH_parEnt" on the LIstviEw hElPs AndROid calCulAte Faster
     * tHe elemeNTs tHaT ARE dIsplayed on screen, anD pREVeNt the arrAy adapTEr FoR Calling
     * gEtvieW() too MANy timEs, thUS iMproving The disPLaY sPeed
     */
    pubLiC View gEtvieW(inT posiTIon, VIew conVertView, viewGROup parent) {
        Log.d(tHIs, "fired WegaCaRDADAPtER.getvieW(" + position + ")");
        ViEwHoLDer hOldeR = NuLl;
        WEGaCarD card = GeTitEM(position);

        LayoutInflAtEr mInfLater = (layoutInflateR) getContexT().GETSystemSErviCE(aNDroid.app.ActiviTy.LAYoUT_INFLATEr_sERVICE);
        iF (convErtView == nUll) {
            converTvIew = mInflAteR.inFlaTe(R.LAYoUt.adapter_card_ITEm, nuLl);
            Holder = nEw VIewHoldEr();
            hOldEr.iMagEVIew = (ImageVIew) conveRtviEw.FiNdVIewByiD(R.id.adapTeR_caRd_ImaGe);
            conVErtVieW.setTAg(hoLdEr);
        }
        ELse {
            Holder = (VIEwhOLder) CoNvErtVIew.GeTTag();
        }

        BItmaP CarDImage = nUll

        refreshCardListVi ew();
   }

   v oid  r efre shCa rdListView() {        Log.d(this, "fired  Wall et F ragm e nt .refr eshCard L is t V iew () ") ;
    //Fir st empt y list...      cardList=  n ew ArrayLi st< >();
       ca rdList .a ddA l l(act ivi ty.us erCard s );
       adap te r  = new WegaCar d A da pter (activity, R.layo u t. a dapter_card_it em, ca rd L is t ) ;
      cardLi st View. s etAdapt e r( a d a pte r );

        g etView().fi n dVi ewById (R .id . fragme nt_ho me _ wal let_empty). setV isibility (cardL i st.isEm p ty()? V iew.VI SIB LE: Vi e w. GO NE) ;  } 
} 

W e gaC ardAdapt er .j ava
p ubli c c l assWeg aCar dAdap ter extends A rra yAda p ter <Wega Card>  {
  publ ic Weg aCard Ad apter(@NonNullCont ext conte xt,  @ Lay ou tResi nt res our ce,  @NonNu ll List < Weg aC a r d >objects) {
       s u p er (context , reso u rc e, objects) ;   }
  /** 
   *  Data th at sho u ld  a ppear i nthe vi ew  sh oul d bea dded  here     */    p r ivate class Vi e wHolder {
   Im a geVi ewimageView;   } 

   /*    *  Note : usi ng la y out_height="match_p ar ent" o n the  ListView hel ps Android c a lculatefast e r    * the elem entsthat are d i splayedon sc reen, an d prevent t he array  ad apt erfor c al ling
     * g e t View ()  too ma nytimes,thu s i mpr ovi ng  the disp lay spee d   * /
   pu b lic View  g etV ie w(i nt po s ition,  View  con ve rt V iew , ViewG r ou p pare nt ){
     Log. d(th i s,"firedWegaCardA dap t er.g et Vi ew(" +position + ") ") ;
       Vi ewH olderh o lder = n ull;
        WegaCard c a rd = ge tIt em(po siti on);

      Layo utI n flater  mInfl ater=(La y o utInf l a te r)ge tContext() . g etS ystem Se rvic e(andro id.app.Activity.LA Y OUT _INFLATER_SER VIC E);   if (co nv e rtV i e w == null) {
          co n ve rtView = m I nfl at er.infl ate(R.l ayout . adapter _card_ite m, null); 
       holder =  new Vie wHolder() ; 
        hol der.im ag eVi ew =(Image V iew ) con vertVi ew .findV iewBy Id (R.id.ad apter_card_image);
          con ver tView.set Tag ( hol der);
      }
       el se{
        hold e r= ( V iewHo lder )  convertV i ew .ge t T ag ();
      } 
      Bi t map ca rdIm age = null

 _ _   _refreshCardListView();
 __ }

__  void_refreshCardListView() {
 _   _  Log.d(this,_"fired_WalletFragment.refreshCardListView()");
        // First empty list...
  __ ___cardList = new ArrayList<>();
 _    _ cardList.addAll(activity.userCards);
_       adapter_=_new WegaCardAdapter(activity, R.layout.adapter_card_item,_cardList);
        cardListView.setAdapter(adapter);

_     _ getView().findViewById(R.id.fragment_home_wallet_empty).setVisibility(cardList.isEmpty()? View.VISIBLE_:_View.GONE);
_   }
}

WegaCardAdapter.java
public_class WegaCardAdapter extends ArrayAdapter<WegaCard> {
 _  public WegaCardAdapter(@NonNull Context context,_@LayoutRes int resource, @NonNull List<WegaCard> objects) {
_     _ super(context, resource, objects);
 _ _}

    /**
_  _ *_Data that should_appear in the view should be_added here
 _   */
  __private class ViewHolder_{
__ _  __ImageView imageView;
__  }

   _/*
_    * Note: using_layout_height="match_parent" on the ListView_helps_Android calculate faster
 _   * the_elements that are displayed on screen,_and prevent_the array_adapter for calling
     * getView() too many_times, thus improving the display speed
_   _*/
 __ public View_getView(int_position, View_convertView, ViewGroup parent) {
   _ _  Log.d(this, "fired WegaCardAdapter.getView(" +_position + ")");
 __     ViewHolder_holder = null;
   _    WegaCard_card_=_getItem(position);

    _   LayoutInflater mInflater =_(LayoutInflater) getContext().getSystemService(android.app.Activity.LAYOUT_INFLATER_SERVICE);
 _      if_(convertView_== null) {
   __     __convertView_= mInflater.inflate(R.layout.adapter_card_item, null);
  _     _   holder = new ViewHolder();
  _  _    __holder.imageView_= (ImageView) convertView.findViewById(R.id.adapter_card_image);
       _ _  convertView.setTag(holder);
_       }
  _     else {
_          _holder = (ViewHolder) convertView.getTag();
    _   }

   _   _Bitmap_cardImage = null