private void syncData() { if (current == walletFrag) { ((WalletsFragment) walletFrag).update(); } else if (current == relationshipFrag) { ((RelationshipsFragment) relationshipFrag).update(); } else if (current == records) { ((RecordsFragment) records).update(); } }
public void showTransactions(User user, Wallet wallet, Boolean addToStack) { if (current != records) { current = records; ((RecordsFragment) records).setUser(user); ((RecordsFragment) records).setWallet(wallet); getFragmentManager().beginTransaction().replace(R.id.container, records).commit(); mDrawerList.setItemChecked(2, true); setTitle(mPlanetTitles[2]); } else { ((RecordsFragment) records).update(user, wallet); } if (addToStack) { fragmentStack.add(FragmentStack.FRAGMENT.Transaction, user, wallet, null, null, null); } }