Refactoring

This commit is contained in:
M66B
2018-08-03 09:58:44 +00:00
parent fb4f0f2f58
commit 74b6cb037d
5 changed files with 16 additions and 4 deletions

View File

@@ -86,11 +86,14 @@ public class FragmentSetup extends Fragment {
if (!once) {
once = true;
Bundle args = new Bundle();
if (account != null)
args.putLong("id", account.id);
FragmentAccount fragment = new FragmentAccount();
fragment.setArguments(args);
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, fragment).addToBackStack("account");
fragmentTransaction.commit();
@@ -120,8 +123,10 @@ public class FragmentSetup extends Fragment {
Bundle args = new Bundle();
if (identity != null)
args.putLong("id", identity.id);
FragmentIdentity fragment = new FragmentIdentity();
fragment.setArguments(args);
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, fragment).addToBackStack("identity");
fragmentTransaction.commit();