From 8441c52b4e7436b5308e8f8b2ebf7143c7559380 Mon Sep 17 00:00:00 2001 From: torrentcome Date: Fri, 28 Jul 2017 16:11:01 +0200 Subject: [PATCH] (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 ;) --- .../main/java/com/keylesspalace/tusky/AccountListActivity.java | 2 +- .../main/java/com/keylesspalace/tusky/FavouritesActivity.java | 2 +- app/src/main/java/com/keylesspalace/tusky/ViewTagActivity.java | 2 +- .../main/java/com/keylesspalace/tusky/ViewThreadActivity.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/AccountListActivity.java b/app/src/main/java/com/keylesspalace/tusky/AccountListActivity.java index 86c5a05c..6b70c89c 100644 --- a/app/src/main/java/com/keylesspalace/tusky/AccountListActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/AccountListActivity.java @@ -74,7 +74,7 @@ public class AccountListActivity extends BaseActivity { } } Fragment fragment = AccountListFragment.newInstance(fragmentType); - fragmentTransaction.add(R.id.fragment_container, fragment); + fragmentTransaction.replace(R.id.fragment_container, fragment); fragmentTransaction.commit(); } diff --git a/app/src/main/java/com/keylesspalace/tusky/FavouritesActivity.java b/app/src/main/java/com/keylesspalace/tusky/FavouritesActivity.java index 257b37bc..88918c35 100644 --- a/app/src/main/java/com/keylesspalace/tusky/FavouritesActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/FavouritesActivity.java @@ -42,7 +42,7 @@ public class FavouritesActivity extends BaseActivity { FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); Fragment fragment = TimelineFragment.newInstance(TimelineFragment.Kind.FAVOURITES); - fragmentTransaction.add(R.id.fragment_container, fragment); + fragmentTransaction.replace(R.id.fragment_container, fragment); fragmentTransaction.commit(); } diff --git a/app/src/main/java/com/keylesspalace/tusky/ViewTagActivity.java b/app/src/main/java/com/keylesspalace/tusky/ViewTagActivity.java index 00904828..1bed66af 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ViewTagActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/ViewTagActivity.java @@ -45,7 +45,7 @@ public class ViewTagActivity extends BaseActivity { FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); Fragment fragment = TimelineFragment.newInstance(TimelineFragment.Kind.TAG, hashtag); - fragmentTransaction.add(R.id.fragment_container, fragment); + fragmentTransaction.replace(R.id.fragment_container, fragment); fragmentTransaction.commit(); } diff --git a/app/src/main/java/com/keylesspalace/tusky/ViewThreadActivity.java b/app/src/main/java/com/keylesspalace/tusky/ViewThreadActivity.java index f118d21d..9bda022a 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ViewThreadActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/ViewThreadActivity.java @@ -45,7 +45,7 @@ public class ViewThreadActivity extends BaseActivity { String id = getIntent().getStringExtra("id"); FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); Fragment fragment = ViewThreadFragment.newInstance(id); - fragmentTransaction.add(R.id.fragment_container, fragment); + fragmentTransaction.replace(R.id.fragment_container, fragment); fragmentTransaction.commit(); }