aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaneren2005 <daneren2005@gmail.com>2013-11-15 11:43:03 -0800
committerdaneren2005 <daneren2005@gmail.com>2013-11-15 11:43:03 -0800
commit69e40126d33f96aeacc1192bbf9a081747c7df50 (patch)
tree743d7c2dd798c14d07fff11372ecb19adf4682f7
parent0235e1b07a14c217d4ae897406347d97f5ca4798 (diff)
downloaddsub-69e40126d33f96aeacc1192bbf9a081747c7df50.tar.gz
dsub-69e40126d33f96aeacc1192bbf9a081747c7df50.tar.bz2
dsub-69e40126d33f96aeacc1192bbf9a081747c7df50.zip
Fix tablets not marking secondaryFragment correctly
-rw-r--r--src/github/daneren2005/dsub/activity/SubsonicActivity.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/activity/SubsonicActivity.java b/src/github/daneren2005/dsub/activity/SubsonicActivity.java
index 83baeb6a..a75fc22d 100644
--- a/src/github/daneren2005/dsub/activity/SubsonicActivity.java
+++ b/src/github/daneren2005/dsub/activity/SubsonicActivity.java
@@ -511,6 +511,7 @@ public class SubsonicActivity extends ActionBarActivity implements OnItemSelecte
// Only move right to left if replaceCurrent is false
if(!replaceCurrent) {
SubsonicFragment oldLeftFragment = backStack.get(backStack.size() - 2);
+ oldLeftFragment.setSecondaryFragment(false);
int leftId = oldLeftFragment.getRootId();
// Make sure remove is finished before adding
@@ -539,7 +540,7 @@ public class SubsonicActivity extends ActionBarActivity implements OnItemSelecte
Fragment oldFrag = (Fragment)currentFragment;
currentFragment = (SubsonicFragment) backStack.remove(backStack.size() - 1);
- currentFragment.setPrimaryFragment(true);
+ currentFragment.setPrimaryFragment(true, false);
supportInvalidateOptionsMenu();
if(secondaryContainer == null) {
@@ -563,6 +564,8 @@ public class SubsonicActivity extends ActionBarActivity implements OnItemSelecte
trans = getSupportFragmentManager().beginTransaction();
trans.add(R.id.fragment_second_container, currentFragment, currentFragment.getSupportTag() + "");
+
+ backStack.get(backStack.size() - 1).setSecondaryFragment(true);
} else {
secondaryContainer.setVisibility(View.GONE);
}