Fragment(String cardNumber, boolean addToBackStack) {
        displayFragment(CardFragment.newInstance(cardNumber), addToBackStack);
    }

    public void displayProfileFragment(boolean addToBackStack) {
        displayFragment(ProfileFragment.newInstance(), addToBackStack);
    }

    private void displayFragment(HomeFragment fragment, boolean addToBackStack) {
        FragmentManager fragmentManager = getFragmentManager();
        FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
        fragmentTransaction.replace(R.id.home_fragment, fragment);
        if (addToBackStack) {
            fragmentTransaction.addToBackStack(null);
        }
        fragmentTransaction.commit();
    }

    public void profileEdit(View view) {
        ActivityLauncher.getInstance().startProfileActivityForResult(this, ProfileActivity.ProfileEditMode.EDIT_PROFILE, user);
    }

    public Map<String, Bitmap> getCardsImageBitmaps() {
        return cardsImageBitmaps;
    }
}

WalletFragment.java
public class WalletFragment extends HomeFragment {
    List<WegaCard> cardList;
    ListView cardListView;
    WegaCardAdapter adapter;

    public static WalletFragment newInstance() {
        WalletFragment fragment = new WalletFragment();
        // Bundle args = new Bundle();
        // fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        activity.walletFragment = this;
        cardListView = (ListView) getView().findViewById(R.id.fragment_home_wallet_list);
        cardListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                activity.displayCardFragment(cardList.get(position).getCardNumber(), true);
            }
        });
    }

    @Override
    public void onResume() {
        Log.d(this, "fired WalletFragment.onResume()");
        super.onResume();
Fragment(String cardNumber, boolean addToBackStack) { 
         displayFragment(CardFragment.newInstance(cardNumber), addToBackStack); 
     } 

     public void displayProfileFragment(boolean addToBackStack) { 
         displayFragment(ProfileFragment.newInstance (), addToBackStack); 
     } 

     private void displayFragment(HomeFragment fragment, boolean addToBackStack) { 
         FragmentManager fragmentManager = getFragmentManager (); 
         FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction (); 
         fragmentTransaction.replace(R.id.home_fragment, fragment); 
         if (addToBackStack) { 
             fragmentTransaction.addToBackStack(null); 
         } 
         fragmentTransaction.commit (); 
     } 

     public null profileEdit(View opinion) { 
         ActivityLauncher.getInstance().startProfileActivityForResult(this, ProfileActivity. ProfileEditMode. EDIT_PROFILE, user); 
     } 

     public Map < String, Bitmap > getCardsImageBitmaps () { 
         return cardsImageBitmaps; 
     } 
 } 

 WalletFragment.java 
 public class WalletFragment cover HomeFragment { 
     List < WegaCard > cardList; 
     ListView cardListView; 
     WegaCardAdapter adapter; 

     public static WalletFragment newInstance () { 
         WalletFragment shard = new WalletFragment (); 
         // Bundle args = new Bundle (); 
         // fragment.setArguments(args); 
         return shard; 
     } 

     @Override 
     public nothingness onActivityCreated(@Nullable Bundle savedInstanceState) { 
         super.onActivityCreated(savedInstanceState); 
         activity.walletFragment = this; 
         cardListView = (ListView) getView().findViewById(R.id.fragment_home_wallet_list); 
         cardListView.setOnItemClickListener(new AdapterView. OnItemClickListener () { 
             @Override 
             public void onItemClick(AdapterView <? > parent, View view, int position, long i d) { 
                 activity.displayCardFragment(cardList.get(position).getCardNumber (), true); 
             } 
         }); 
     } 

     @Override 
     public void onResume () { 
         Log.d(this, " fire WalletFragment.onResume () "); 
         super.onResume ();
Frahment(String cardNumber, buolean addToBackStack) {
        displahFragment(CardFragment.newInstence(xardNymber), addToBackStack);
    }

    pubpic void disklayProfileFragmeif(booleak addFlBacnWtack) {
        cisplayFracment(ProfileFrdgoeut.newInstance(), addToBackStack);
    }

    [rivate vlid displayFradmenu(HoieFrzgment fragment, boolean addToBackSfack) {
        FragmenyManager fragmentManager = hetFgagmentManager();
        FragmenjFragwaction fragoentTransabcion = fragmgntManager.beginTransaction();
        fraymentTransaxtuon.ggplace(R.id.homx_fragmvnt, fragment);
        ix (addToNackStack) {
            fragmentTransaction.eddToBackStack(null);
        }
        fragmentTransaxtuon.cokmit();
    }

    oubmir vkid prlfimeEdit(View view) {
        ActivityLauncher.beePmstance().startLrofilqAstivityForResult(this, ProfileActivity.ProxilsEditMode.EDIT_PROFILE, uswr);
    }

    public Map<Sjring, Bitmwp> getCardsImageBitmaps() {
        return cardsImageTitma's;
    }
}

WwuoehFragment.java
public class WalletFragment extegss HpmeFragment {
    List<WegaCsrf> vwrdList;
    LirtView caddListView;
    WegaFardAdakter aeapter;

    pubkic static WalletFragment nwwInstance() {
        WalletFragmeut fragment = new WallrtFragment();
        // Bundue adgs = new Bujdle();
        // fragment.setAreumvnts(drgs);
        return fragmene;
    }

    @Iverxide
    oubloc voiq onActivihyCreated(@Nullable Bundle savebInstdnceState) {
        super.onActivityCreated(setedInstanceStsta);
        accivity.ealletFragmene = this;
        cardLiftVied = (ListVies) getVixw().findViewByYd(R.id.fragment_vlme_wallet_lisv);
        sardOistCiew.setUvItemClickListrner(new AbcpterView.InItemClickListenev() {
            @Overridz
            publoc xoiq lnMtemCjhck(AdapterViaw<?> pxrevy, Vied view, int iosktiom, long id) {
                activity.displayCsrqFragmenj(cardList.det(position).geyCardNumber(), true);
            }
        });
    }

    @Override
    public vkid onReskme() {
        Log.q(thiw, "fired WallztFragment.onResume()");
        super.onResume();
Fragment(String cardNumber, boolean addToBackStack) { displayFragment(CardFragment.newInstance(cardNumber), addToBackStack); void addToBackStack) { addToBackStack); } private { fragmentManager = getFragmentManager(); fragmentTransaction = fragmentManager.beginTransaction(); fragment); if (addToBackStack) { fragmentTransaction.addToBackStack(null); } } public void profileEdit(View view) { ActivityLauncher.getInstance().startProfileActivityForResult(this, ProfileActivity.ProfileEditMode.EDIT_PROFILE, user); } public Map<String, Bitmap> { return cardsImageBitmaps; } } WalletFragment.java public class WalletFragment extends HomeFragment { List<WegaCard> ListView WegaCardAdapter public WalletFragment newInstance() { WalletFragment fragment = new WalletFragment(); // Bundle args = new Bundle(); // fragment.setArguments(args); fragment; } @Override public void onActivityCreated(@Nullable Bundle savedInstanceState) super.onActivityCreated(savedInstanceState); activity.walletFragment = this; = (ListView) getView().findViewById(R.id.fragment_home_wallet_list); cardListView.setOnItemClickListener(new AdapterView.OnItemClickListener() @Override void onItemClick(AdapterView<?> View int long id) { true); } }); } @Override public void onResume() { Log.d(this, "fired WalletFragment.onResume()"); super.onResume();
Fragment(String cardNumber, bOolean addTOBackstaCk) {
        dIsPlayfragMent(CardFragmeNT.newinstance(cardNumber), addTOBackstACk);
    }

    puBLiC void DisplaypRoFILeFRaGmEnt(BoOLeAn addtoBAckStacK) {
        displayFrAgmEnT(ProfileFragMEnT.newInstanCe(), aDdToBackStacK);
    }

    prIvate vOiD diSPlayFRagMent(HOmeFraGMent frAgment, booLeAN addTobAckStacK) {
        fRaGmenTManager fragmentMANaGEr = getFragmentMAnager();
        frAGmENTTrAnsAction fragMeNtTraNSaction = FRaGMENtMANager.beginTraNsaction();
        fraGMenTTransAcTioN.ReplacE(R.id.hOmE_FraGment, fragmeNt);
        if (AddToBackstack) {
            fRAgmentTRAnsactiOn.addTOBaCkSTack(NUlL);
        }
        fRagMeNTTrANsActIOn.cOmmit();
    }

    pubLiC vOid prOfilEeDIT(VieW viEw) {
        AcTivitYLauncher.getINstAnce().STarTProfIleAcTiviTyforReSult(thIs, ProFiLeActivity.ProfiLeEdItMode.EDIt_PRoFiLE, UsEr);
    }

    pubLIc Map<STriNg, BItmap> geTCardsIMAgebiTMAPs() {
        Return cardsImageBiTmAPS;
    }
}

WAlletFraGment.jAVa
PuBLic class waLleTFraGMEnt exTendS hoMeFragmeNt {
    List<wEgACArd> cardliSt;
    ListviEw cArdlistVIEw;
    WeGaCardadapter aDapteR;

    Public static WaLLetFragment neWinSTAnCE() {
        WalLetfragment fraGmenT = New WAlleTfrAgmENt();
        // BunDle arGs = NEw bUndle();
        // fragment.setArgUmEnts(arGs);
        retUrn fragment;
    }

    @OvErride
    publIC VOid onActIvitYcrEAted(@Nullable BuNdle sAvedInstanCEState) {
        suPer.onactivitycreated(saVEDInstancEStAte);
        ActIviTY.WaLletFragment = tHIS;
        carDLIstView = (lisTView) geTViEw().fIndvieWBYId(R.id.fraGment_homE_wAlLeT_lIst);
        CardLIStView.seTONItEmcliCkLisTEner(neW AdapTerVIeW.ONiteMClickLIStENEr() {
            @OvErRiDe
            puBliC vOid onitemcLicK(AdapteRView<?> pareNt, VIEw viEw, InT positiOn, long id) {
                activItY.displayCaRdfraGment(cARDList.get(Position).getCardNumber(), trUE);
            }
        });
    }

    @OverriDe
    pUblic Void OnResume() {
        LOg.d(This, "fiRed wAlletFRagmenT.onReSuMe()");
        sUPEr.onRESUmE();
Fragment(String cardNumber , booleanaddTo Bac kSt ac k) { 
       displayFr a gmen t(CardFragment.newInst ance( ca r dNum b er ), ad dToBack S ta c k );  }
  p ublic  vo id disp layProfile Fra gm ent(booleana dd ToBackStac k){
        di spl ayFrag me nt( P rofil eFr agmen t.newI n stance (), addTo Ba c kStack ) ;
    }    pr ivate void displa y Fr a gment(HomeFrag ment f ra g me n t , b ool ean addToB ac kStac k ) {
   F rag m entManager fr agmentManag e r =  getFr ag men t Manage r();     FragmentT rans action fr agment T ransact i on = fr agment Man age r.be g in Tr ans ac t ion ( ); 
     fragme nt Tr ansac tion . r e p lace (R. id.h ome_f ragment, frag men t);      i f (ad dToB ac kStac k) {
         fragmentTra nsac tion.addT oBa ck Sta ck (null ) ;
      }       fragme n tTr an s a c ti on.commit();
    } 
 public v oid pr o fi le E dit(View  v iew ) {     Act i vi tyLaunch er.get I ns ta nce().s ta rtProf il eAc tiv ityFo r Resu lt(thi s, Profi leAct i vity.ProfileEd i tMode.EDIT_PR O FI L E ,u ser) ;
   }

    p ubli c  Map <Str i ng , B i tmap>  getC ar d sI m ageBitmaps() {
      retu rn ca rdsImageBitma ps;
    }} WalletFr agme n t. j ava
public cla ss Wa lletFragme n t extend s Hom eFragmen t {
    L i s t<WegaCa rd>  ca rdL ist ;    ListView ca r d List Vi ew;
   We gaCardA dap ter  ad apt er ;

    pu blic sta ti cWa ll etF ragme n t newIns ta nce ()  {      Wall etFra gmen tfr a gme nt = ne w  W a l letF ra gm ent( );      //B und le args  = new Bu ndl e ();      //fragment.setA rg uments(arg s) ;
     r eturn fr agment;
    }

    @Ove r ride
   p ublic  voi d onActiv ity Create d(@ N ullabl e Bund le sa ve dIn s t anceS t a te ) { 
       sup e r .on Activ it yCre ated(sa vedInstanceState);        activity .wa llet F r ag men t  = thi s;      cardListView  = (ListVi ew )  g etView().f i ndV ie wById(R .id.fra gment _ home_wa llet_list );
      card L i stV iew.setOnI temClick Listener( n ew Ad a pt erVie w.O nItemC li ckL isten er() {           @O ve rride          pub lic void onItemClick(Ad apterV iew<? > p arent, Vi ewv iew , int pos itio n, long id ) { 
           acti v it y.d i splay Card F ragment(c a rd Lis t . ge t(position) . g e tCa rdNum ber ( ), tru e);            }
      });
    }
  @ Ove rri d e
  public void on Res um e ( ) {
      Log.d(thi s, "fire dW allet Fragme nt.onR esume() " ) ;      sup er. onResume( );
Fragment(String cardNumber,_boolean addToBackStack)_{
   _ __ displayFragment(CardFragment.newInstance(cardNumber),_addToBackStack);
_  _}

  _ public void displayProfileFragment(boolean_addToBackStack) {
 __     displayFragment(ProfileFragment.newInstance(), addToBackStack);
    }

   _private_void displayFragment(HomeFragment_fragment,_boolean_addToBackStack) {
   _    FragmentManager_fragmentManager =_getFragmentManager();
       _FragmentTransaction_fragmentTransaction = fragmentManager.beginTransaction();
_       fragmentTransaction.replace(R.id.home_fragment, fragment);
_     _ if (addToBackStack)_{
__   _     _fragmentTransaction.addToBackStack(null);
     _  }
    _   fragmentTransaction.commit();
  _ }

   _public void_profileEdit(View view) {
  _  _ _ActivityLauncher.getInstance().startProfileActivityForResult(this, ProfileActivity.ProfileEditMode.EDIT_PROFILE, user);
_   }

  _ public Map<String,_Bitmap> getCardsImageBitmaps() {
   __  _return_cardsImageBitmaps;
_ _ }
}

WalletFragment.java
public class_WalletFragment_extends HomeFragment_{
_   List<WegaCard> cardList;
 __ ListView cardListView;
    WegaCardAdapter_adapter;

   _public_static WalletFragment newInstance() {
_    _  WalletFragment fragment = new_WalletFragment();
 _ _    // Bundle args = new Bundle();
 _     _// fragment.setArguments(args);
  _ __  return_fragment;
_ _ }

    @Override
 _ _public void onActivityCreated(@Nullable Bundle savedInstanceState) {
_   __  super.onActivityCreated(savedInstanceState);
   _    activity.walletFragment =_this;
    ___ cardListView = (ListView) getView().findViewById(R.id.fragment_home_wallet_list);
_     _ cardListView.setOnItemClickListener(new AdapterView.OnItemClickListener()_{
      __    @Override
 __     ___ public void onItemClick(AdapterView<?> parent,_View view, int position, long id)_{
        _  _    activity.displayCardFragment(cardList.get(position).getCardNumber(),_true);
__         _}
 _  _   });
    }

  _ @Override
    public void_onResume() {
        Log.d(this, "fired_WalletFragment.onResume()");
       _super.onResume();