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

@@ -40,11 +40,13 @@ public class ActivityCompose extends ActivityBase implements FragmentManager.OnB
getSupportFragmentManager().addOnBackStackChangedListener(this);
if (getSupportFragmentManager().getFragments().size() == 0) {
FragmentCompose fragment = new FragmentCompose();
Bundle args = getIntent().getExtras();
if (args == null)
args = new Bundle();
FragmentCompose fragment = new FragmentCompose();
fragment.setArguments(args);
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, fragment).addToBackStack("compose");
fragmentTransaction.commit();