From f0a4561cb5f83db1d73edc411226fe9f1389671f Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Wed, 8 Oct 2014 17:44:12 -0700 Subject: #408 Reimplement tablet transitions for just right side --- src/github/daneren2005/dsub/activity/SubsonicActivity.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/github/daneren2005') 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; } -- cgit v1.2.3