(fragment) quick changed

The duplicated interface will no appeared anymore. The problem is with the "stack memory" who do weird thing with his fragments.

no more duplicated stuff after that ;)
This commit is contained in:
torrentcome 2017-07-28 16:11:01 +02:00
parent 239ebaf9b2
commit 8441c52b4e
4 changed files with 4 additions and 4 deletions

View file

@ -74,7 +74,7 @@ public class AccountListActivity extends BaseActivity {
} }
} }
Fragment fragment = AccountListFragment.newInstance(fragmentType); Fragment fragment = AccountListFragment.newInstance(fragmentType);
fragmentTransaction.add(R.id.fragment_container, fragment); fragmentTransaction.replace(R.id.fragment_container, fragment);
fragmentTransaction.commit(); fragmentTransaction.commit();
} }

View file

@ -42,7 +42,7 @@ public class FavouritesActivity extends BaseActivity {
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
Fragment fragment = TimelineFragment.newInstance(TimelineFragment.Kind.FAVOURITES); Fragment fragment = TimelineFragment.newInstance(TimelineFragment.Kind.FAVOURITES);
fragmentTransaction.add(R.id.fragment_container, fragment); fragmentTransaction.replace(R.id.fragment_container, fragment);
fragmentTransaction.commit(); fragmentTransaction.commit();
} }

View file

@ -45,7 +45,7 @@ public class ViewTagActivity extends BaseActivity {
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
Fragment fragment = TimelineFragment.newInstance(TimelineFragment.Kind.TAG, hashtag); Fragment fragment = TimelineFragment.newInstance(TimelineFragment.Kind.TAG, hashtag);
fragmentTransaction.add(R.id.fragment_container, fragment); fragmentTransaction.replace(R.id.fragment_container, fragment);
fragmentTransaction.commit(); fragmentTransaction.commit();
} }

View file

@ -45,7 +45,7 @@ public class ViewThreadActivity extends BaseActivity {
String id = getIntent().getStringExtra("id"); String id = getIntent().getStringExtra("id");
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
Fragment fragment = ViewThreadFragment.newInstance(id); Fragment fragment = ViewThreadFragment.newInstance(id);
fragmentTransaction.add(R.id.fragment_container, fragment); fragmentTransaction.replace(R.id.fragment_container, fragment);
fragmentTransaction.commit(); fragmentTransaction.commit();
} }