aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-10-08 17:44:12 -0700
committerScott Jackson <daneren2005@gmail.com>2014-10-08 17:44:12 -0700
commitf0a4561cb5f83db1d73edc411226fe9f1389671f (patch)
treed733b2f6d906b35d2a6713cdcd87ea92b2f566b3
parent1272d83ed5f01bc4f913522bc3833c069aedbdcc (diff)
downloaddsub-f0a4561cb5f83db1d73edc411226fe9f1389671f.tar.gz
dsub-f0a4561cb5f83db1d73edc411226fe9f1389671f.tar.bz2
dsub-f0a4561cb5f83db1d73edc411226fe9f1389671f.zip
#408 Reimplement tablet transitions for just right side
-rw-r--r--src/github/daneren2005/dsub/activity/SubsonicActivity.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/github/daneren2005/dsub/activity/SubsonicActivity.java b/src/github/daneren2005/dsub/activity/SubsonicActivity.java
index 6d1a9330..c3f8e4a7 100644
--- a/src/github/daneren2005/dsub/activity/SubsonicActivity.java
+++ b/src/github/daneren2005/dsub/activity/SubsonicActivity.java
@@ -584,6 +584,7 @@ public class SubsonicActivity extends ActionBarActivity implements OnItemSelecte
}
// Add fragment to the right container
+ trans.setCustomAnimations(R.anim.enter_from_right, R.anim.exit_to_left, R.anim.enter_from_left, R.anim.exit_to_right);
trans.add(R.id.fragment_second_container, fragment, tag + "");
// Commit it all
@@ -611,12 +612,12 @@ public class SubsonicActivity extends ActionBarActivity implements OnItemSelecte
FragmentTransaction trans = getSupportFragmentManager().beginTransaction();
// Remove old right fragment
- // trans.setCustomAnimations(R.anim.enter_from_left, R.anim.exit_to_right, R.anim.enter_from_right, R.anim.exit_to_left);
+ trans.setCustomAnimations(R.anim.enter_from_left, R.anim.exit_to_right, R.anim.enter_from_right, R.anim.exit_to_left);
trans.remove(oldFrag);
// Only switch places if there is a backstack, otherwise primary container is correct
if(backStack.size() > 0) {
- // trans.setCustomAnimations(0, 0, 0, 0);
+ trans.setCustomAnimations(0, 0, 0, 0);
// Add current left fragment to right side
trans.remove(currentFragment);
@@ -632,7 +633,7 @@ public class SubsonicActivity extends ActionBarActivity implements OnItemSelecte
newLeftFragment.setSecondaryFragment(true);
trans.show(newLeftFragment);
} else {
- // secondaryContainer.startAnimation(AnimationUtils.loadAnimation(this, R.anim.exit_to_right));
+ secondaryContainer.startAnimation(AnimationUtils.loadAnimation(this, R.anim.exit_to_right));
secondaryContainer.setVisibility(View.GONE);
}
@@ -655,7 +656,7 @@ public class SubsonicActivity extends ActionBarActivity implements OnItemSelecte
}
protected void recreateSpinner() {
- if(currentFragment.getTitle() == null) {
+ if(currentFragment == null || currentFragment.getTitle() == null) {
return;
}