Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73e371ff authored by Adam Powell's avatar Adam Powell
Browse files

Tweak action bar show/hide animations

Change-Id: I69a7b0f84b36ef6f22cc03036daab7e54e1ab74e
parent 7d179eeb
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -505,12 +505,13 @@ public class ActionBarImpl extends ActionBar {
        }
        mContainerView.setVisibility(View.VISIBLE);
        mContainerView.setAlpha(0);
        mContainerView.setTranslationY(-mContainerView.getHeight());
        AnimatorSet anim = new AnimatorSet();
        AnimatorSet.Builder b = anim.play(ObjectAnimator.ofFloat(mContainerView, "translationY", 0))
            .with(ObjectAnimator.ofFloat(mContainerView, "alpha", 1));
        AnimatorSet.Builder b = anim.play(ObjectAnimator.ofFloat(mContainerView, "alpha", 1));
        if (mContentView != null) {
            b.with(ObjectAnimator.ofFloat(mContentView, "translationY", -mContainerView.getHeight(), 0));
            b.with(ObjectAnimator.ofFloat(mContentView, "translationY",
                    -mContainerView.getHeight(), 0));
            mContainerView.setTranslationY(-mContainerView.getHeight());
            b.with(ObjectAnimator.ofFloat(mContainerView, "translationY", 0));
        }
        anim.addListener(mShowListener);
        mCurrentAnim = anim;
@@ -527,11 +528,12 @@ public class ActionBarImpl extends ActionBar {
        }
        mContainerView.setAlpha(1);
        AnimatorSet anim = new AnimatorSet();
        AnimatorSet.Builder b = anim.play(
                ObjectAnimator.ofFloat(mContainerView, "translationY", -mContainerView.getHeight()))
            .with(ObjectAnimator.ofFloat(mContainerView, "alpha", 0));
        AnimatorSet.Builder b = anim.play(ObjectAnimator.ofFloat(mContainerView, "alpha", 0));
        if (mContentView != null) {
            b.with(ObjectAnimator.ofFloat(mContentView, "translationY", 0, -mContainerView.getHeight()));
            b.with(ObjectAnimator.ofFloat(mContentView, "translationY",
                    0, -mContainerView.getHeight()));
            b.with(ObjectAnimator.ofFloat(mContainerView, "translationY",
                    -mContainerView.getHeight()));
        }
        anim.addListener(mHideListener);
        mCurrentAnim = anim;